[TW5] Using tm-add-tag to add a tag to a newly made tiddler

110 views
Skip to first unread message

Taylor Jensen

unread,
Sep 3, 2016, 4:06:05 PM9/3/16
to TiddlyWiki
I have

<$button>
<$action-sendmessage $message="tm-new-tiddler" title="note" tags="note" text=<
<storyTiddler>>/>
<$fieldmangler tiddler="note">
<$action-sendmessage $message="tm-add-tag" $param={{Active Production}}/>
</$fieldmangler>
Test Button
</$button>

Both parts work on their own, but even though the fieldmangler widget is set to modify the "note" tiddler, it won't do it unless "note" already exists (ie the button didn't just make it).

Any thoughts on why that's the case and how to make it work correctly?

-TCJ

PMario

unread,
Sep 3, 2016, 6:04:29 PM9/3/16
to TiddlyWiki
Hi,

You should use action-setfield widget [1]. It's much more flexible and powerful. ..NO need for the fieldmangler widget. IMO it's only designed to be used with edit templates by the core.

-m


[1] http://tiddlywiki.com/#ActionSetFieldWidget

Matabele

unread,
Sep 4, 2016, 1:05:03 AM9/4/16
to TiddlyWiki
Hi Taylor

If you wish to make one or more new tiddlers with fancy titles and several field values set -- perhaps employ the MakeTid plugin from here.

I put this up in a bit of a hurry for someone else -- there are brief docs for the plugin available from the docs in 'ControlPanel/Plugins' tab and a couple of examples on the wiki.

regards

Taylor Jensen

unread,
Sep 4, 2016, 4:58:42 AM9/4/16
to TiddlyWiki
This is literally perfect. You rock, thanks!

-TCJ
Reply all
Reply to author
Forward
0 new messages