Template talk:Tnavbar-collapsible
From Wikipedia, the free encyclopedia
Contents |
[edit] Expand/Collapse preselection option
Just a thought of an inclusion of selecting whether the template appears pre-collapsed or pre-expanded? By this I mean, using the {{#if:{{{expand|yes}}*template expanded*}}}/{{#if:{{{expand|no}}*template collapsed*}}} function somehow, it would mean you could use the template like this: "{{template I'm using|expand=no}}" would show just as an unexpanded bar, however "{{template I'm using|expand=yes}}" would show it expanded. If this is implemented on the template end, that means that it wouldn't affect any templates out there that don't use the function, but those that do can elect to use it, but don't need to create two templates, just two functions from the one.
Who else thinks this is a good idea?
--lincalinca 06:56, 19 April 2007 (UTC)
- It can't be done with this template. The collapsing statement (
class="... collapsible autocollapse") needs to appear in the opening tag of the table. If you want that particular template's collapsibility to be set on a per-page bases useclass="... collapsible {{{state|autocollapse}}}". —Dispenser 18:15, 19 April 2007 (UTC)
[edit] bg:Шаблон:tnavbar-collapsible
{{editprotected}} Could you please insert bg:Шаблон:tnavbar-collapsible?Thank you.--Desertus Sagittarius 21:42, 2 September 2007 (UTC)
- Interwiki links are added to this page: Template:Tnavbar-collapsible/doc. It's editable by everyone. Cheers. --MZMcBride 22:08, 2 September 2007 (UTC)
[edit] Boost title size to match that of {{Navbox}}
{{editprotected}} Due to a recent change in the navbox class CSS, the font-size of the title in other templates using this template is too small. The following changes make the font-size of the title match the size of standard {{Navbox}}s. Based on the latest database dump, there should be very few, if any, ill-effects. Once this change goes through, I'll be checking to make sure that everything is still okay.
Completely replace the code of this template with this new code:
<span style="float:left; text-align:left; width:6em; margin-left:2px;">{{Tnavbar|{{{2|}}}|{{#ifeq: {{{plain|}}} |1 |plain |mini }}=1|nodiv=1 |fontcolor={{{fontcolor|}}} }}</span><span style="font-size:110%;{{#if:{{{fontcolor|}}}|color:{{{fontcolor|}}};}}">{{{1}}}</span><noinclude>
{{documentation}}
{{pp-template|small=yes}}
<!-- Add cats and interwikis to the /doc subpage, not here! -->
</noinclude>
Thanks, --CapitalR (talk) 22:20, 1 April 2008 (UTC)
- Disabled editprotected for the moment. See my reply at User talk:CapitalR/Navbox. — Edokter • Talk • 22:27, 1 April 2008 (UTC)
Done. — Edokter • Talk • 14:51, 2 April 2008 (UTC)
[edit] Modifications to template
{{editprotected}} It looks like this template had some old band-aid fixes in it to make it look right; now that the code has been modified to look like that of {{Navbox}}, those old work-arounds should be removed (as it is causing the navbar to be off by a few pixels).
Namely, the "margin-left:2px;" should be removed and the "|nodiv=1" should be removed. In addition, the floating span tag should be changed to a floating div tag (due to the parser not always handling the span tag correctly; this is a known parser bug, and this is the best work around). In summary, the code for this template should be completely replaced by the following:
<div style="float:left; text-align:left; width:6em;">{{Tnavbar|{{{2|}}}|{{#ifeq:{{{plain|}}}|1|plain|mini}}=1|fontcolor={{{fontcolor|}}}}}</div><span style="font-size:110%;{{#if:{{{fontcolor|}}}|color:{{{fontcolor|}}};}}">{{{1}}}</span><noinclude>
{{documentation}}
{{pp-template|small=yes}}
<!-- Add cats and interwikis to the /doc subpage, not here! -->
</noinclude>
I tested this on a bunch of templates to make sure it works, and it seems to do the trick. Let me know if there are questions, --CapitalR (talk) 03:15, 10 April 2008 (UTC)

