Template talk:Collapsible option

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

Version

{{

editprotected
}} You protected The Wrong Version! Please replace the page with the following:

<noinclude>{{pp-template|small=yes}}</noinclude>
Use <code style="font-size:95%">{{<!--
--><includeonly>{{PAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=collapsed}}</code> to show this template in its collapsed (hidden) state.<br/><!--

-->Use <code style="font-size:95%">{{<!--
--><includeonly>{{PAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=expanded}}</code> to show this template in its expanded (fully visible) state.<br/><!--

-->Use <code style="font-size:95%">{{<!--
--><includeonly>{{PAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=autocollapse}}</code> to show this template in its collapsed (hidden) state only if there is another template of the same type on the page. ({{{state|This}}} is the default.)<noinclude>

{{documentation}}

<!-- add categories, interwiki links etc on the bottom of /doc page, not here -->
</noinclude>

Thanks. —Ms2ger (talk) 15:28, 16 June 2008 (UTC)[reply]

Thanks for pointing this out. --- RockMFR 18:39, 16 June 2008 (UTC)[reply]

Edit request

{{

editprotected
}} Hi. Please prefix each "Use..." statement in the template with an asterisk to produce a wikistyle bullet list. (Suggest this makes reading the list easier when lines wrap, also when more "Use..." variations added after it.) Sardanaphalus (talk) 02:31, 22 August 2008 (UTC)[reply]

 Done Happymelon 13:48, 23 August 2008 (UTC)[reply]

Copied from another talkpage

{{

editprotected
}}

[...] Do you know if/how there's a way for [Template:Collapsible option] to look at the {{{state}}} parameter of the template in which it's transcluded and thereby render the [correct "(This is usually the default.)"] phrase automatically?
[...] {{{state}}} doesn't tend to be set, or is set incorrectly, or has been changed, etc) [...] Do you know if it's possible to have {{collapsible option}} set its {{{state}}} parameter automatically, depending on where it's been transcluded? Sardanaphalus (talk) 19:53, 23 August 2008 (UTC)

Anyone, please? Sardanaphalus (talk) 17:53, 24 August 2008 (UTC)[reply]

And also please make a little edit so that it is possible to use this template in the

doc page of a template without the "/doc" appeared. --Quest for Truth (talk) 20:07, 17 September 2009 (UTC)[reply
]

 Not done Please give a complete and specific description of the edit requested so that clueless admins don't send the wiki spiraling into an early demise.  Skomorokh  22:02, 17 September 2009 (UTC)[reply]
Came here wanting the same thing (usability on the /doc subpage) and concluded that mucking around with this template to make it an option was too much like hard work, but making a fork ({{Collapsible option-doc}}) was easy. Ergo, I did that. Rd232 talk 12:05, 25 October 2009 (UTC)[reply]
Scratch that. I've just realised that the magic word {{BASEPAGENAME}} will work equally well for the /doc page and the template page, so I've amended this template. Rd232 talk 11:09, 26 October 2009 (UTC)[reply]

Consensus for universal use of template?

Gentlemen, it has been noted over the past several months that one or two editors are inserting this template into every navbox within certain WikiProjects, greatly expanding its transclusion count in a very brief period of time. Is this the result of some Wikipedia-wide navbox standardization consensus of which I am unaware? Or has such consensus been determined on a project-by-project basis? The courtesy of a timely response to this inquiry is requested. Thank you. Dirtlawyer1 (talk) 10:19, 21 September 2012 (UTC)[reply]

For the record, I note that nearly 12 weeks have elapsed since I made the above inquiry on this talk page, and none of the creators, editors, or proponents of this template have seen fit to answer the inquiry. Please note I hereby contest any purported universal use of this template by consensus, as no such consensus is reflected on this talk page or anywhere else on Wikipedia. Accordingly, I will continue to delete this template from all navboxes that I maintain and from those on which I work as a superfluous bit of coding that serves no useful purpose. Dirtlawyer1 (talk) 18:54, 13 December 2012 (UTC)[reply]
I am confused. Are you against the use of |state={{{state|}}} in a navbox, or are you against adding documentation of this feature? this template does not add the feature, but generates the documentation of this feature. depending on your objection, this may or may not be the correct forum. Frietjes (talk) 20:42, 13 December 2012 (UTC)[reply]
Frietjes, I am against the universal use of this template in what is rapidly becoming every navbox on Wikipedia. The feature which it documents is used so rarely in practice that including the documentation universally is redundant in almost all circumstances. Every navbox template page does not require an advertisement for a feature whose application is rarely needed. I believe the near universal addition of this template was ill-considered and represents one of those ideas whose greatest merit is that it generates a higher edit count for the users adding it to the navbox template pages. In short, it is a template in search of a purpose. Dirtlawyer1 (talk) 18:28, 14 December 2012 (UTC)[reply]
I see, so you are against adding documentation. I am personally against adding both |state={{{state|}}} and {{collapsible option}} to templates which clearly don't need it. however, I am not against adding {{collapsible option}} to templates that are using |state={{{state|}}}. I don't see anything wrong with documenting a feature. however, I don't see a need to add an additional feature to a template which doesn't need it. so, if you remove the {{collapsible option}}, please also remove the |state={{{state|}}} at the same time. Frietjes (talk) 18:44, 14 December 2012 (UTC)[reply]

Note: It's now possible to omit the "state=".

an editor has been adding this text next to transclusions where state = {{{state|{{{1|}}}}}} is used, instead of state = {{{state|}}}. to allow for uniform presentation of this note, I suggest adding this note to this template. Please add the following line at the end of the template:

{{#ifeq:{{{state optional|}}}|true|Alternatively, the <code>state =</code> can be omitted.}}

which, if there have been no other edits, should be the same as this diff. thank you. Frietjes (talk) 21:20, 28 November 2012 (UTC)[reply]

  • Comment. I'm the editor to whom Frietjes refers, so, naturally, I approve his (her?) message. This one too, I think -- so long as omitting the "state=" will work where this template is shown. CsDix (talk) 22:50, 30 November 2012 (UTC)[reply]
  • Question: I thought that the |state= parameter has always been optional, and that if it is omitted {{navbox}} and similar templates default to autocollapsed. This is true for cases where |state={{{state|}}} in templates like {{Algeria topics}}, and for these templates to behave differently when |state={{{state|{{{1|}}}}}} there would have to be a value specified in the first unnamed parameter when they are transcluded. Has there this been the case in a significant number of these transclusions? Or I guess what I'm trying to say is, why can't we just say that autocollapsed is the default state and leave it at that? Best — Mr. Stradivarius (have a chat) 00:24, 1 December 2012 (UTC)[reply]
    • at least one editor [that'd be me, CsDix] has been changing |state={{{state|}}} to |state={{{state|{{{1|}}}}}} and then appending "Note: It's now possible to omit the "state="." just after this template. I personally think this is pointless, but whatever. however, if we are going to be adding this "first unnamed parameter" option to a load of templates, then rather than pasting "Note: It's now possible to omit the "state="." in every single template, might as well just document it here. however, if people feel we should go back to |state={{{state|}}}, then clearly this isn't needed. the convention, as far as I recall, has been to use |state={{{state|}}} and reserve {{{1|}}} for {{navbox with collapsible groups}}. until we can have that discussion, I was hoping to add the additional documentation here, which could be easily tracked, and removed later if necessary. thank you. Frietjes (talk) 01:11, 1 December 2012 (UTC)[reply]
  • This is just about the convenience (and, cumulatively, the space saved) by using {{Template |state}} rather than {{Template |state=state}} -- isn't it..? CsDix (talk) 03:02, 1 December 2012 (UTC)[reply]
    Ok, now I see what's going on - thanks for the clarification. Are there any templates that this documentation would apply to which use the first unnamed parameter for anything other than a shortcut for the |state= parameter? We need to think of all the possible cases when working this out. — Mr. Stradivarius (have a chat) 05:34, 1 December 2012 (UTC)[reply]
    Yes, that's what I'm also wondering when I said "... so long as omitting [etc]" above. Also, wouldn't the state-handling of those templates using this collapsible-option message need to be amended to include {{{1| ...}}}, e.g. by a bot..? (If so, I'm still thinking it's probably worth doing -- although maybe that's because I wouldn't be programming the bot!) CsDix (talk) 09:08, 1 December 2012 (UTC)[reply]
    Ok, Done. As this is an optional parameter, I couldn't see any harm in adding it. However, its addition to the template should not be taken as an endorsement to add |state={{{state|{{{1|}}}}}} to more navboxes. I think a change on this large a scale needs a full discussion where all community members have a chance to comment. I suggest starting a new thread at
    WP:VPT to make sure there is a solid consensus for rolling this out on a wide scale. Best — Mr. Stradivarius (have a chat) 12:32, 1 December 2012 (UTC)[reply
    ]

Thanks, Mr. Stradivarius. However, could...

  1. the parameter be renamed "statename";
  2. the value become "optional";
  3. the "state =" in the message added become "state=";
  4. the message added start on a new line;
  5. and an inline example included,

...please, as...

  1. "state optional" suggests the parameter is something about the state itself rather than the "state=" wording;
  2. the syntax would then become "statename=optional";
  3. there isn't a space between "state" and the subsequent equals-sign in the main message;
  4. the message added is more easily noticed when it has been added;
  5. an example should make clear what's meant by the added message.

In other words, I'm think I'm thinking of...

{{#ifeq:{{{statename|}}}|optional |<br/>Alternatively, the <code>state=</code> can be omitted (for example, <code>{{<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>''Template name''</noinclude> |expanded}}</code>}}

...in the template's code.

I'm also thinking it might be worth adding a space between each <noinclude> and |state= in the main message, to produce e.g.

....{{Template name |state=collapsed}}....

...in order to make the separation between the Template name (however unorthodox and/or lengthy it might be) and the state parameter.

Hope this wouldn't be too much trouble. And thanks for your

WP:VPT suggestion, which I intend to act on. CsDix (talk) 20:22, 2 December 2012 (UTC)[reply
]

Edit request on 12 February 2013

Currently, this template message's last sentence, about whether (and what) default state might be in use, seems to be presented as more of an afterthought than as worthwhile as the rest of the message's information. So, here's a version (in the template's sandbox) giving this sentence its own line and more handling. (If this version is implemented, I'll add an example to the documentation to indicate how the message changes when a custom default state is supplied.)

CsDix (talk) 17:41, 12 February 2013 (UTC)[reply]

Done, but with this small amendment. --Redrose64 (talk) 19:48, 12 February 2013 (UTC)[reply]
Thanks for your speedy action – and for the amendment. (I'd commented out the space as, depending on the browser, I thought it might otherwise affect the output; but, if you reckon not, that's fine.) CsDix (talk) 22:03, 12 February 2013 (UTC)[reply]
Except when editing a page, browsers never get to see parser functions like {{#if:}} - these, like all other Wiki markup, are converted to HTML by the Wikimedia servers. --Redrose64 (talk) 22:47, 12 February 2013 (UTC)[reply]
Understood – thanks for explaining. CsDix (talk) 00:53, 13 February 2013 (UTC)[reply]

Template-protected edit request on 29 January 2014

The semicolon formatting used at the very start of this template can produce uneven linespacing when the template is added below other content, so please replace the first line

; {{larger|How to manage this template's visibility}}

with

'''{{resize|120%|How to manage this template's visibility}}'''

Thank you, 213.246.85.251 (talk) 11:31, 29 January 2014 (UTC)[reply]

  • Not done for now: I'm not going to do this as proposed as there is no consensus to change the size of the text from 110% to 120%. Please do one of the following:
  • Re-propose your request using the existing {{
    Larger
    }}
  • Put your request in the sandbox and make appropriate testcases (maybe show all three sizes; {{
    Big}}, and {{Resize
    |120%}})
Thank you for your assistance. Technical 13 (talk) 15:07, 29 January 2014 (UTC)[reply]
information Note: I moved the bolding inside the template. I agree that the font-size should remain the same at 110%. Hopefully, this will solve the problem with the rendering. Funandtrvl (talk) 17:50, 29 January 2014 (UTC)[reply]

Template-protected edit request on 14 May 2014

Please replace the template's code with the sandbox version here (current as of this message). The changes made are:

  1. The pp-template code placed after rather than before the template's main code, compressed but otherwise unchanged;
  2. {{big}} (115%) rather than {{larger}} (110%) heading (more consistent beside other headings and/or font-sizes over 100% when this template transcluded on template pages and/or within {{Documentation}});
     ...Having just seen the thread above, I've added a Heading size comparisons section to the testcases page;
  3. &thinsp;s rather than &nbsp;s (better transition between <code> and plain text);
  4. " {{ (( }} " and " &#124; " in place of " { &#123; " and " | ";
  5. Bullet-points before two rather than all four lines of text;
  6. Each line of text no longer interrupted by comment tags;
  7. Corrected conditional used in fourth line of text;
  8. Fourth line now shown in italics if amended by |default=;
  9. Removed comment after {{Documentation}}.

The single change I'd originally intended to make was #8, but I then noticed the need for #7 and the remainder followed thereafter. Sardanaphalus (talk) 17:00, 14 May 2014 (UTC), updated 17:20, 14 May 2014 (UTC)[reply]

done. Frietjes (talk) 18:34, 14 May 2014 (UTC)[reply]

Template-protected edit request on 24 May 2014

Please replace the string

to show this template in its collapsed (hidden) state.

with

to show this template in its [[Help:Collapsing|collapsed]] (hidden) state.

i.e. add a Help link for the sake of anyone encountering this template without knowledge of collapsing/revealing/expanding/etc. Sardanaphalus (talk) 10:26, 24 May 2014 (UTC)[reply]

 Not done: I'm not sure it's a helpful link since Help:Collapsing is about collapsible tables only, not about navboxes and other templates (which is what this template is for). The hatnote-linked WP:NavFrame, albeit about the collapsing method used for templates, are about how to make templates collapsible using CSS classes and is probably too technical for users who want to know what collapsing is. SiBr4 (talk) 10:42, 24 May 2014 (UTC)[reply]

Rephrasing

This template may be used beside other templates that also refer to parameters after a template name (e.g. {{Collapsible sections option}}), so I'm proposing the rephrasing here (current sandbox version at the time of this message). Sardanaphalus (talk) 11:22, 29 June 2014 (UTC)[reply]

I support the change shown in the old version linked. I came here to propose the same (parameters & values in <code>). -DePiep (talk) 15:45, 22 October 2014 (UTC)[reply]
  • I've now updated the template (and, as a consequence, amended its layout) accordingly. Sardanaphalus (talk) 11:49, 26 October 2014 (UTC)[reply]

Whitespace errors