Misunderstanding tabs macro i need your help please

Hello,

I would like to be able to create a tiddler using a button tagged with the name of the open TAB, and then display this tiddler as a child TAB
Everything works perfectly for the first created tiddler, but not for subsequent ones.
I’m not sure if I’m being clear, so I suggest to connect you to my public tiddlywiki to see the issue I’m encountering.

https://aft-temper-11.tiddlyhost.com/

If you click on the “A1” tab and click on the “New tiddler L2” button, you can see a new tiddler labeled with “A1”, but it won’t appear as a child TAB of A1.
I don’t understand why and would like your help, please.

In advance Thank you

This isn’t an issue with your button, but with the way you defined that particular instance of the tabs macro. tabsList expects a filter—a standard filter like "[tag<currentTab>]" and/or a list of specific titles like "AL1 AL2 [[Multi-word title]]". Instead, you’re using a filtered attribute value:

tabsList={{{ [tag<currentTab>] }}}

Filters in triple braces get rendered in two different ways, depending on where you use them:

  • As a stand-alone piece of wikitext, they yield a list of links to each of the filter’s results.
  • As an attribute (following = in a widget or an HTML element), they set the value of the attribute to the first result and only the first result of the filter.

In your sample tabsList, this means tabsList={{{ [tag<currentTab>] }}} = tabsList="AL2", and so “AL2” is the only tab that shows up. Your working example tabsList="[tag[AL1]sort[]]" uses quote marks instead of triple braces, so it doesn’t have the same issue.

Try replacing tabsList={{{ [tag<currentTab>] }}} with tabsList="[tag<currentTab>]", and it should work as you’d expect.

3 Likes

Thank your for your answer and solution. That’s works like expected.
I really appreciate your explanation too !
I understand my mistake now.

1 Like