Tag macro with image as link

18 views
Skip to first unread message

bopaige

unread,
Sep 27, 2010, 10:57:34 PM9/27/10
to TiddlyWiki
I am using the <<tag tagname>> macro to display a dropdown of all
tiddlers with a given tag, but I'd like to have it display an image
instead of the 'tagname'. Is this possible?

Eric Shulman

unread,
Sep 27, 2010, 11:07:31 PM9/27/10
to TiddlyWiki
http://www.TiddlyTools.com/#SetIconPlugin

for your use-case:

{{span{<<tag tagname>><<setIcon filename.jpg "" notext>>}}}


enjoy
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Tobias Beer

unread,
Sep 28, 2010, 7:00:22 AM9/28/10
to TiddlyWiki
Hi Eric,

> http://www.TiddlyTools.com/#SetIconPlugin
> {{span{<<tag tagname>><<setIcon filename.jpg "" notext>>}}}

Wow, this is great stuff!!!

If you want to make it behave nicely with QuickOpenTagPlugin [1], you
must add the following to the code of SetIconPlugin right after this
line...

if (!btn) return; // can't find a link

//Fix for QuickOpenTagPlugin
jQuery(btn).closest('.quickopentag').children('.tiddlyLink').remove();


@Eric Shulman
Is is it worth updating your plugin with this or would there be too
many other such fixes?

@Simon Baird
I guess it were much better for QuickOpenTagPlugin to specify an
additional parameter for the <<tag>> macro by the name of
"showDefault" which renders the default tag button instead of a
"quickopentag".

Cheers, Tobias.

Bob Paige

unread,
Sep 28, 2010, 3:03:22 PM9/28/10
to tiddl...@googlegroups.com
Thanks all, that works perfectly.


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To post to this group, send email to tiddl...@googlegroups.com.
To unsubscribe from this group, send email to tiddlywiki+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.


Reply all
Reply to author
Forward
0 new messages