Opening only one copy of Tag dropdown

The trick mentioned in Use variable="transclusion" in a list widget to get unique popups doesn’t seem to work with a dynamic tag name. I’m sure it’s just a brain fart, but I would appreciate it if someone could explain what’s wrong with this:

<table>
<tr><th>Name</th><th>Tags</th></tr>
<$list filter=[tag[HelloThere]]>
<tr><td>{{!!title}}</td><td><$list filter="[enlist{!!tags}]" join="  " variable="transclusion"><$transclude $variable="tag"  tag=<<transclusion>> /></$list></td></tr>
</$list>
</table>

which tries to use the trick in that post, but with a dynamic tag name. But it still yields this, when clicking on a tag pill:

I assume I have to refer to the tag parameter in a different manner, but how?

(I also tried to manually wrap a <$qualify> widget around the transclusion, to the same effect.

Any suggestions?

Untested code:

<table>
<tr><th>Name</th><th>Tags</th></tr>
<$list filter=[tag[HelloThere]]>
<$let transclusion=<<currentTiddler>> >
<tr><td>{{!!title}}</td><td><$list filter="[enlist{!!tags}]" join="  "><$transclude $variable="tag"  tag=<<currentTiddler>> /></$list></td></tr>
</$let>
</$list>
</table>

The key is that the transclusion variable should be unique for each tiddler in the outer loop. You could refactor the filters to assign the transclusion variable in the outer list widget itself.

1 Like

That does it. I was working on the inner list.

As always, thank you very much for the help!