I created a Tiddler intended to be used as a Template for Transclusion, 
that shows a list of pages tagged with the current tiddler, with a header 
on the list:

Pages tagged with <$macrocall $name="tag-pill-body" tag=<<currentTiddler>> 
icon={{!!icon}} colour={{!!color}} palette={{$:/palette}} 
element-tag="""$button""" element-attributes="""tag='span'"""/>:
<ul><$list filter="[tag<currentTiddler>]">
<li><$link><$view field="title" /></$link></li>
</$list></ul>

That works well enough if I add in "{{||Tagged Pages List}}" on the 
tiddlers that are used as tags, but what I'd like is to put in the logic 
"If any tiddlers use this tiddler as a tag, then show this block of text". 
I think adding a tiddler as a ViewTemplate would allow this, but what I'm 
struggling with is that header above the list. On pages that have no 
tiddlers that use it as a tag, I don't want that header to show.

I see the CountWidget as a way to get a "how many tiddlers are tagged with 
this one" (<$count filter="[tag<currentTiddler>]" />), but how to do the 
"if ... then" logic within the template, to not show anything if the count 
is zero? Is this one where I'd be best defining my own Widget to handle 
that?

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/be359675-186d-4069-951c-a9df009bb725%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to