A tag command?

63 views
Skip to first unread message

Tim Pizey

unread,
Dec 2, 2019, 1:14:34 PM12/2/19
to tiddl...@googlegroups.com
Hi,

I can find a group of tiddlers with some text in their title.
What I would like to do is add a tag to each member of the group.

Is there a way to do that?


cheers
Tim

--
Tim Pizey - http://tim.pizey.uk/

TonyM

unread,
Dec 2, 2019, 5:24:26 PM12/2/19
to TiddlyWiki
Tim,

There are tools that will help you do this but learning how to do it yourself can be quite informative.

If you can generate a list of your tiddler this way
<$list filter="yourfilter here">

</$list>

you can place this in a button like this so that on clicking the button the actions will be applied to each tiddler

<$button>
<$list filter="yourfilter here">
  "Actions"
</$list>
buttonname
</$button>

So in your case you want to add mytag
<$action-sendmessage $message="tm-add-tag" $param="mytag"/>
but you could add other actions there

If you see this you learn the fieldmangler widget is required for some "messages" and it will not work unless its wrapped as follows. 
Noting fieldmangler defaults to currentTiddler so it needs to be where the currentTiddler value changes

So the final result you can test on tiddlywiki.com is

<$button>
<$list filter="[prefix[A]]">
   <$fieldmangler>
  <$action-sendmessage $message="tm-add-tag" $param="mytag"/>
  </$fieldmangler>
</$list>
Tag below with mytag
</$button>

<$list filter="[prefix[A]]">

</$list>


Note how I include a list along with the button so I can see what I would impact.

You could have a filter stored elsewhere referenced in both list and button to make sure they have an identical filter. Even editable;

Now I have taught you to fish, https://kookma.github.io/TW-Commander/ will help you without learning as much

Regards
Tony

Reply all
Reply to author
Forward
0 new messages