Jump to content

Template talk:Navbar-collapsible

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Expand/Collapse preselection option

[edit]

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)[reply]

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 use class="... collapsible {{{state|autocollapse}}}". —Dispenser 18:15, 19 April 2007 (UTC)[reply]

{{editprotected}} Could you please insert bg:Шаблон:tnavbar-collapsible?Thank you.--Desertus Sagittarius 21:42, 2 September 2007 (UTC)[reply]

Interwiki links are added to this page: Template:Navbar-collapsible/doc. It's editable by everyone. Cheers. --MZMcBride 22:08, 2 September 2007 (UTC)[reply]

Boost title size to match that of {{Navbox}}

[edit]

{{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)[reply]

Disabled editprotected for the moment. See my reply at User talk:CapitalR/Navbox. EdokterTalk 22:27, 1 April 2008 (UTC)[reply]
 Done. EdokterTalk 14:51, 2 April 2008 (UTC)[reply]

Modifications to template

[edit]

{{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)[reply]

 Done Happymelon 10:33, 10 April 2008 (UTC)[reply]

Question

[edit]

{{editprotected}} when looking at the source of this template see here, why is it that there is one Template in red at the bottom, where it lists the templates transcluded onto this template. Could that be fixed? --Gman124 talk 02:51, 18 February 2009 (UTC)[reply]

It won't be fixed unless it's (a) breaking something; or (b) you provide working code to fix it. Cheers. --MZMcBride (talk) 08:53, 20 February 2009 (UTC)[reply]

Centering

[edit]

The most recent version of this template broke centering of the title, also looks like it is using "style" instead of "fontstyle" for the parameter. Suggested fix:

<div style="float:left; text-align:left; width:6em;">{{Tnavbar|{{{2|}}}|{{#ifeq:{{{plain|}}}|1|plain|mini}}=1|fontstyle=color:{{{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>

FYI I've not fully tested the above fix but am pretty sure it is right. PaleAqua (talk) 09:21, 20 March 2009 (UTC)[reply]

[edit]

I have received good responses about a template I created which unite several different elements of CONMEBOL. However, the biggest drawback has been coloring the link color of the v • d • e. I have tried and retried trying to make that font while. Any help would be greatly appreciated.


Jamen Somasu (talk) 13:31, 24 May 2010 (UTC)[reply]

Lua

[edit]

@Jackmcbarn: Does the Lua version work? I've tried fixing the width of multiline {{Navbox}} titles (see here), and this template could be affected by any CSS changes needed so might need to use a div for this template's title. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me
11:53, 10 January 2017 (UTC)[reply]

Template-protected edit request on 17 March 2019

[edit]

Please revise the name of the DeLorean. The correct name is DeLorean not DeLorean DMC-12. Expandinglight5 (talk) 05:05, 17 March 2019 (UTC)[reply]

 Not done: this is the talk page for discussing improvements to the template {{Navbar-collapsible}}. Please make your request at the talk page for the article concerned. – Jonesey95 (talk) 06:15, 17 March 2019 (UTC)[reply]

Template-protected edit request on 25 March 2020

[edit]

Panama has 558 confirmed cases and 8 deaths and 2 recovered. Source: https://www.tvn-2.com/nacionales/personas-recuperadas-casos-COVID-Panama_0_5541195909.amp.html 190.219.162.190 (talk) 23:37, 25 March 2020 (UTC)[reply]

 Not done: this is the talk page for discussing improvements to the template {{Navbar-collapsible}}. If possible, please make your request at the talk page for the article concerned. If you cannot edit the article's talk page, you can instead make your request at Wikipedia:Requests for page protection#Current requests for edits to a protected page. P.I. Ellsworth  ed. put'r there 15:15, 26 March 2020 (UTC)[reply]

Automatic template name

[edit]

I propose to change {{subst:FULLPAGENAME}} recommended value in the documentation to {{PAGENAME}}. The second parameter of {{navbar-collapsible}} is described as "the name of the template", and the name of a template obviously does not include the "Template" namespace. Removing subst ensures {{navbar-collapsible}} continues to work after a template name change. There's no need to change anything in {{navbar-collapsible}}'s code—it already works with {{PAGENAME}}. Only a change in the documentation is necessary. — UnladenSwallow (talk) 02:33, 15 April 2020 (UTC); edited 17:22, 18 April 2020 (UTC)[reply]

Even better, use {{PAGENAME}} as the default value of the second parameter, allowing us to simply write:

{{navbar-collapsible|Heading wikitext}}

— UnladenSwallow (talk) 16:51, 15 April 2020 (UTC); edited 17:22, 18 April 2020 (UTC)[reply]
The above approach only worked for me because the article and the template happened to have the same name (sans the namespace). In all other cases it won't work because Wikicode is evaluated in the context of the article, not the template. Apologies for the confusion, and feel free to delete this entire section. — UnladenSwallow (talk) 17:22, 18 April 2020 (UTC)[reply]