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?