Jump to content

Extension talk:Tabs/Usage

Add topic
From mediawiki.org
Latest comment: 2 years ago by 2601:441:8300:3B52:F2A2:6D82:6105:8904 in topic Special Characters are output as HTML elements

Tab toggle in parser

[edit]

Hello,

how can one set this tab to "collapsed" ?

{{#tab:Empty item card|File:IC-Item-parameters.png}}

where do I need to enter the |collapsed / |collapsed=true attribute please? 62.44.6.154 (talk) 13:44, 23 March 2020 (UTC)Reply

I couldn't get it working with the parser function syntax (though I may be overlooking something obvious).
You may need to use the tag interface instead:
<tab name="Empty item card" collapsed>
[[File:IC-Item-parameters.png]]
</tab> Nirobbins (talk) 13:59, 23 March 2020 (UTC)Reply
I just took a look at the code, and there's absolutely no facility to collapse a tab created with #tab, so Nirobbins' suggestion is the way to go. Using #tag, that would look like this:
{{#tag:tab|[[File:IC-Item-parameters.png]]|name="Empty item card"|collapsed=}} – Robin Hood  (talk) 18:04, 24 March 2020 (UTC)Reply

Nested Tabs

[edit]

How do I get nested tabs to work? Can I get an example code? 123.136.115.130 (talk) 16:34, 5 September 2020 (UTC)Reply

As you can read at the bottom of Extension:Tabs/Usage (specifically Extension:Tabs/Usage#Combining tags), you should use the parser function syntax whenever you're trying to nest multiple instances of this extension's tabs. If this doesn't work, please ask a more specific question with examples of what is not working, so I can more specifically help you. For now, I think the docs already answer your question. Joeytje50 (talk) 14:49, 9 December 2020 (UTC)Reply
I have a really hard time following the text at Extension:Tabs/Usage#Combining tags
What I'm trying to do is created nested tabs where both the outer and the inner tabs show up as tabs, and not as toggle boxes or dropdowns. I've tried using #tag:tabs, #tag:tab, and #tab, but everything I try results in toggle boxes. If the parser didn't interpret the inner </tag>as a close for the outer, I'd do it like this:
<tags>
<tab name=One>Some content</tab>
<tab name=Two>
<tabs>
<tab name=Subtab A>Subtab A's content</tab>
<tab name=Subtab B>Subtab B's content</tab>
</tabs>
</tab>
</tabs>
I've tried every combination using <nowiki>{{#tabs:}}</nowiki> that I can think of, and the inner tabs ''always'' show up as dropboxes. --~ 24.233.212.248 (talk) 03:16, 17 December 2020 (UTC)Reply
Sorry - I mean they always show up as toggle boxes. 24.233.212.248 (talk) 03:17, 17 December 2020 (UTC)Reply
And after reading it for the hundredth time, I saw this:
All combinations of nesting multiple tags will work, except for nesting any tab menus inside other tab menus.
Sigh. 24.233.212.248 (talk) 03:53, 17 December 2020 (UTC)Reply

Special Characters are output as HTML elements

[edit]

Not sure how to fix this. Even tried controlling it from the wiki's common.js file to try and force a replace but it's resistant. Doesn't accept any escape commands or nowiki. Is this just a flaw in the extension? what am I missing? 2601:441:8300:3B52:F2A2:6D82:6105:8904 (talk) 01:17, 9 December 2023 (UTC)Reply