Adding default parameter to toc-tabbed macros

As in this recent thread, but for toc-tabbed macros, I’m frustrated not to have any way to specify — dynamically — a default value.

It’s true there’s a parameter for selected tab. So, if I set the selected parameter to a non-temp system tiddler, then (once the toc renders), I can click on my preferred (would-be-default) tab to get that tab saved as the selected tab.

But this is just a workaround, and not a great solution for an actively edited public-facing wiki.

Having any toc render with the “select a tiddler at left to see its contents (or any similar message)” feels tacky to me. The GUI is intuitive enough, and I want there to be content from the get-go.

So, I want visitors to see contents of a default tab within the tabbed toc (I’d be happy with the default by default being the first tiddler that meets the toc’s filter condition), and for that tab to continue to be what loads for each web visitor, even if I happen to edit and save the wiki with some other tab selected.

Surely, it shouldn’t be necessary for me to set each toc’s selected tab value manually; it should be possible to have a default parameter (in my view template) that accepts a filter.

Yes? Is this easy to add? Doing so would improve consistency with how other tabs work, and surely would not break anything. Worth a PR?

2 Likes