Eric, Thanks for taking the time to answer this in so much detail, again, it's given me not only a solution but something to learn too.
I'm going to make those changes and I'll report back. I wonder why this workaround isn't in the core? There is probably a consequence that I wont see until I start playing with it though. What I love about Tiddlywiki is that there always seems to be several ways of achieving a functional result in a creative way. Thanks again, I'll let you know how I get on. Cheers, Geoff. On Tuesday, June 9, 2020 at 9:48:35 PM UTC+1, Eric Shulman wrote: > > > > On Tuesday, June 9, 2020 at 1:01:07 PM UTC-7, Geoff Tothill wrote: >> >> It works perfectly, but I have discovered a problem with my grand plan, >> which I should have predicted. >> Many of the tags are repeated in the new tiddler, as they are >> transcluded, and when one is clicked, all the others also produce drop >> downs of their associated tiddler titles. >> Is there any way of stopping that behaviour on a per tiddler basis so >> that the tags displayed by your filter code are not clickable. Or even, at >> a push, all tags globally are rendered non clickable? >> > > There *is* a workaround that allows the tag popups to be displayed > individually... but it's a subtle bit of a trick. First... a little > technical background info: > > The tag pill popup is defined in the *$:/core/ui/TagTemplate* shadow > tiddler, and uses this line to control when it is displayed > <$reveal state=<<qualify "$:/state/popup/tag">> type="popup" > position="below" animate="yes" class="tc-drop-down"> > Note the use of <<qualify ...>> in the $reveal state parameter. The > qualify macro (see https://tiddlywiki.com/#qualify%20Macro) *"returns a > unique string that encodes its position within the widget tree, as > identified by the stack of transcluded tiddlers that lead to that > position."* Thus, the result of the <<qualify>> macro returns the same > value for all items shown in the same tiddler. To force each tag pill > occurrence gets a uniquely qualified state value, we need that value to be > calculated from a different position on the "stack of transcluded > tiddlers". We can achieve this by splitting the tiddler content into two > tiddlers so that we render the tag pill from a different tiddler. > > Here's what you need to do: > > 1) Rewrite the previous version of the code like this: > <$list filter="[tag[... your tag here ...]]"> > __<$link />__<br> > <$list filter="[<currentTiddler>tags[]]" variable="currentTag"> > {{||ShowTagPill}} > </$list><br> > <blockquote><$transclude mode="block"/></blockquote> > </$list> > > Note how > <$macrocall $name="tag" tag=<<currentTag>> /> > has been replaced with a transclusion of a separate "ShowTagPill" tiddler > {{||ShowTagPill}} > > 2) Define the "ShowTagPill" tiddler, containing just the previous > $macrocall > <$macrocall $name="tag" tag=<<currentTag>> /> > > That's it. Now, when the "tag" $macrocall is invoked, it will be from a > different position in the transclusion stack, resulting in a different -- > and unique <<qualify>> value for that tag pill. > > The effect is that clicking on one tag pill will only open the popup for > that instance of the tag pill, and will no longer open the popup for ALL > occurrences of the same tag pill. > > Hopefully, this explanation wasn't too confusing!...Give it a try and let > me know how it goes. > > enjoy, > -e > > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9794c424-ecab-47a2-8d8f-076137b6d45do%40googlegroups.com.

