Transclude image if Tiddler has tag...

67 views
Skip to first unread message

vinvi...@gmail.com

unread,
Jan 19, 2021, 7:50:47 AM1/19/21
to TiddlyWiki
Hello,

I want to transclude an image in the text field if the tiddler has tag:

Tag "Cold" show image "Blue.png"
Tag "Cool" show image "Aqua.png" "
Tag "Neutral" show image "White.png"
Tag "Warm" show image "Orange.png"
Tag "Hot" show image "Red.png"

How do I do that?
Thank you,

Eric Shulman

unread,
Jan 19, 2021, 8:30:46 AM1/19/21
to TiddlyWiki
On Tuesday, January 19, 2021 at 4:50:47 AM UTC-8 vinvi...@gmail.com wrote:
I want to transclude an image in the text field if the tiddler has tag:
Tag "Cold" show image "Blue.png"
Tag "Cool" show image "Aqua.png" "
Tag "Neutral" show image "White.png"
Tag "Warm" show image "Orange.png"
Tag "Hot" show image "Red.png"

Try this:
Create a tiddler, e.g., ShowColorImage, tagged with $:/tags/ViewTemplate, containing:
<$list filter="[<currentTiddler>tag[Cold]]">{{Blue.png}}</$list>
<$list filter="[<currentTiddler>tag[Cool]]">{{Aqua.png}}</$list>
<$list filter="[<currentTiddler>tag[Neutral]]">{{White.png}}</$list>
<$list filter="[<currentTiddler>tag[Warm]]">{{Orange.png}}</$list>
<$list filter="[<currentTiddler>tag[Hot]]">{{Red.png}}</$list>

enjoy,
-e

vinvindtvin

unread,
Jan 19, 2021, 5:02:11 PM1/19/21
to tiddl...@googlegroups.com
Thank you

-------- Oorspronkelijk bericht --------
Van: Eric Shulman <elsd...@gmail.com>
Datum: 19-01-21 14:30 (GMT+01:00)
Aan: TiddlyWiki <tiddl...@googlegroups.com>
Onderwerp: [tw5] Re: Transclude image if Tiddler has tag...

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/7WVb6u4JK7s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f9e28364-115c-4edf-90ae-5a9a38522110n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages