[TW5] Displaying tag in a tiddler

79 views
Skip to first unread message

FrD

unread,
Sep 7, 2015, 11:04:43 AM9/7/15
to TiddlyWiki
Hi,

I'like to display tags inside a tiddler, for instance to list the tags of another tiddler. But I don't want the tags to be "active tags" , i.e. I only want them to have the appearance of a tag, only the styling.

So I'm using the trick described by "Skeeve" in tw5magick.tiddlyspot.com, search for Displaying Tags tiddler.
This works well for the background color of the tag pill, but the problem remains for the foreground color.
I did a bit of research in the shadows tiddlers and found that I'd probably have to use the contrastcolour macro.

Could someone give me some directions on how to use this macro ?
Or is there a simpler way to display a tag pill ?

Thanks

FrD

BJ

unread,
Sep 7, 2015, 2:05:12 PM9/7/15
to TiddlyWiki
This will create a list of tags
<$list filter="all[shadows+tiddlers]tags[]sort[]]">{{||$:/core/ui/TagTemplate}}</$list>

make a clone the tiddler $:/core/ui/TagTemplate - call it MYTagTempate

and remove from the clone the button parameter " popup=<<qualify "$:/state/popup/tag">> "  then use as

<$list filter="all[shadows+tiddlers]tags[]sort[]]">{{||MYTagTemplate}}</$list>

cheers
BJ

FrD

unread,
Sep 7, 2015, 2:27:23 PM9/7/15
to TiddlyWiki
Hi BJ,

Thanks a lot for the tip !
I removed the popup parameter and replaced the button by a span.
And it displays nice now !

FrD
Reply all
Reply to author
Forward
0 new messages