[TW5] Button Tooltip of tiddler field

79 views
Skip to first unread message

TonyM

unread,
Jan 23, 2018, 6:27:57 PM1/23/18
to TiddlyWiki
Folks,

Some help required please.

I would like to create a button that does nothing, but has a tooltip = to a value in another tiddlers field

In this case the Other tiddler can be found with the macro <<currentMenu>> and I would like the tool-tip to come from <<currentMenu>>'s description field

<$button tooltip="Description of <<currentMenu>>" class="tc-btn-invisible tc-tiddlylink" >
{{$:/core/images/info-button}}
</$button>


This is where I have started, does not work of course, but not sure how to proceed.

Thanks
Tony

Diego Mesa

unread,
Jan 23, 2018, 9:22:48 PM1/23/18
to TiddlyWiki
Hey Tony,

This might not be the TW way to do this, but I just used Evans formula plugin like so:

<$button tooltip=(= {{test!!description}}=) class="tc-btn-invisible tc-tiddlylink" >
{{$:/core/images/info-button}}
</$button>

Where I set a test tiddlers description field appropriately and this worked. You cant test it on:

http://evanbalster.com/tiddlywiki/formulas.html

TonyM

unread,
Jan 23, 2018, 9:30:38 PM1/23/18
to TiddlyWiki
Thanks Diego,

Yes I would use Evans formula but as I am building a plugin I am trying to avoid dependencies.

I just solved it

\define infodesc(tiddlername)
<$button tooltip={{$tiddlername$!!description}} class="tc-btn-invisible tc-tiddlylink" >
{{$:/core/images/info-button}} </$button>
\end

<<infodesc tiddlername>>

Thanks
Tony

Diego Mesa

unread,
Jan 23, 2018, 9:33:36 PM1/23/18
to TiddlyWiki
Makes perfect sense!

I've just been trying to force myself to find ways to use the plugin more and this was a really easy no brainer. Thanks for sharing your solution!
Reply all
Reply to author
Forward
0 new messages