Thanks, that got me on the right track for an answer!
Using the [tag<currentTiddler>limit[1]]] filter as an outer $list works,
though it resets the currentTiddler variable to the first tiddler that's
tagged with the original tiddler. So, I ended up doing this:
A global Macro (in case I want to use it elsewhere):
\define listTagged(tagName)
<$set name="t" value=<<__tagName__>>><$list filter="[title<t>]">
<$count filter="[tag<t>]" /> 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<t>]">
<li><$link><$view field="title" /></$link></li>
</$list></ul>
</$list>
</$set>
\end
And then a ViewTemplate to use it:
<$set name="t" value=<<currentTiddler>>>
<$list filter="[tag<currentTiddler>limit[1]]">
<hr />
<$macrocall $name="listTagged" tagName=<<t>> />
</$list>
</$set>
The trick is I used a $set call to save the first currentTiddler value to a
separate variable (t) for use later in the logic.
On Friday, March 22, 2019 at 9:50:09 PM UTC-5, TonyM wrote:
>
> MidnightLightning
>
> Partial answer for you, but FYI the standard google groups is appropriate
> for this kind of question and you may get a faster response there.
>
> Rather than count the tags $list <https://tiddlywiki.com/#ListWidget> the
> tags with limit[1] and the content of the list widget will only show if
> there are more than one tag.
>
> [tag<currentTiddler>limit[1]]
>
> You could use emptyMessage if you wanted.
>
> In other circumstances (except variables at present) you can use the View
> widget, as The content of the <$view> widget is displayed if the field or
> property is missing or empty.
>
> Regards
> Tony
>
>
--
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/b61c9219-b6d8-4a21-be88-cb93356489d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.