List ops and tiddlers with multi-word titles

21 views
Skip to first unread message

David Allen

unread,
Apr 12, 2020, 7:40:35 PM4/12/20
to TiddlyWiki
Hey, so I'm trying to create a list from the items in a field and I'm trying to add a button to each item that will remove that item and only that item.  So far, it's working with single-worded tiddlers, but tiddlers with more than one word in the title are not being removed.

Here's the code I have so far:
<$list variable="the_list" filter="[enlist{!!faction_list}]">
<$button class="icon_button">{{Constants!!image_trash}}
<$action-listops $field="faction_list" $subfilter="+[remove<the_list>]"/></$button><<the_list>><br>
</$list>

faction_list:
[[United Federation of Planets]] [[Ascendant Star]] [[Chodak Empire]] Dominion



Anyone know why this isn't working?

Mat

unread,
Apr 12, 2020, 7:49:48 PM4/12/20
to TiddlyWiki
\define x() [[$(the_list)$]]


<$list variable="the_list" filter="[enlist{!!faction_list}]">
<$button class="icon_button">xxx
<$action-listops $field="faction_list" $subfilter="+[remove<x>]"/></$button><<the_list>><br>
</$list>


<:-)

TonyM

unread,
Apr 12, 2020, 7:55:32 PM4/12/20
to TiddlyWiki
David

I have the code to do this I will try and share soon. I'm on my mobile. Some questions that may lead you to a solution,

would not each button try and remove current tiddler not the list?

no need to use the remove operator in the list ops subfilter just a - minus
E.g. -[<currentTiddler>]

Regards
Tony

Reply all
Reply to author
Forward
0 new messages