Tag Toggle Button

64 views
Skip to first unread message

TonyM

unread,
Oct 8, 2018, 9:48:08 PM10/8/18
to TiddlyWiki
Folks,

I have the following Button I defined, the first button works and tags the tiddler with pinned, and then show the second button.

But clicking the second button is not working and will not remove the tag.

<$fieldmangler>
<$list filter="[is[current]!tag[Pinned]]" variable=null>
  <$button message="tm-add-tag" param="Pinned" tooltip="Add Pinned tag" class=<
<tv-config-toolbar-class>>>
    {{$:/PSaT/Pinned/unpinned}}
  </$button>
</$list>
<$list filter="[is[current]tag[Pinned]]" variable=null>
  <$button $message="tm-remove-tag" param="Pinned" tooltip="Remove Pinned tag" class=<
<tv-config-toolbar-class>>>
    {{$:/PSaT/Pinned/pinned}}
  </$button>
</$list>
</$fieldmangler>
The is no documentation for when and where, or how to use fieldmangler, But I have tried it different ways

Thanks in Advance
Tony

Mark S.

unread,
Oct 8, 2018, 11:29:47 PM10/8/18
to TiddlyWiki
It's the dollar sign ($) on the second $message. Aren't those on-again, off-again dollar signs confusing?!

Good luck!
-- Mark

TonyM

unread,
Oct 8, 2018, 11:46:15 PM10/8/18
to TiddlyWiki
Mark,

Thanks - You were correct the second Message has the $ sign which when removed now works.

It makes sense in a way, that is the message parameter of the button widget,

Not the $message parameter of the action send message widget that uses $message so you can also pass the parameter message=

But yes,

Its too easy sometimes, with computers as a whole for a single character, to staff things up big time.

Thanks
Tony
Reply all
Reply to author
Forward
0 new messages