Editing
Template:Collapsible option/doc
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Documentation subpage}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> {{High-use|demo={{ROOTPAGENAME}}}} {{tlx|Collapsible option}} is a utility template that provides a standardised message for [[Help:Transclusion|transclusion]] on [[Wikipedia:Template documentation|template documentaion]] pages for templates whose collapsibility may be managed by the parameter {{para|state}}. It can be used on either the template page itself (wrapped within {{tag|noinclude}} tags), but it is almost always better to place it in the template's {{tlx|documentation subpage}}. ===Indicating optional use of {{samp|state}} name=== {{Update|inaccurate=yes|date=December 2024|reason=Removed in [[Special:Diff/657041913|2015]]|talk=Broken_statename_parameter}} The {{para|state}} parameter used to manage collapsible templates need not always be named explicitly, i.e. {{tnull|{{var|Template name}}{{!}}{{var|state}}}} can be the same as {{tnull|{{var|Template name}}|state{{=}}{{var|state}}}}, if the template is coded that way. To indicate this in the {{tnull|Collapsible option}} message, add the parameter {{para|statename|optional}}. This modifies the message so that it reads (if it were used for itself): <div style="clear:both;margin:1.0em 0;background:whitesmoke;"> {{Collapsible option |statename=optional}} </div> This possibility is enabled by including: *<code><nowiki>{{{1|}}}</nowiki></code> as part of a collapsible template's {{para|state}} parameter{{spaced ndash}}for instance, as {{para|state|<nowiki>{{{state|{{{1|}}}}}}</nowiki>}} or {{para|state|<nowiki>{{{state|{{{1|<noinclude>expanded</noinclude>}}}}}}</nowiki>}}, etc. *<code><nowiki><noinclude></nowiki></code>,<code><nowiki><includeonly></nowiki></code>as part of a collapsible template's <code>state</code> argument{{spaced ndash}}for instance, as {{para|state|<nowiki>{{{state<includeonly>|collapsed</includeonly>}}}</nowiki>}} If, however, the template includes collapsible sections within itself (e.g. {{tlx|Navbox with collapsible groups}}), then enabling this possibility may introduce ambiguity as regards what is to be collapsed or expanded. In those instances, therefore, the requirement to use {{para|state}} should be retained. ===Changing the default state=== To change the default state {{tnull|Collapsible option}} uses, add the parameter {{para|default|collapsed}} or {{para|default|expanded}} accordingly. To restore the default, remove any {{para|default}} previously included. The {{para|default|collapsed}} option must not be used in main article content in mainspace, e.g. to hide [[Wikipedia:Manual of Style/Tables|tables of information]], or to cram extraneous details into [[Wikipedia:Manual of Style/Infoboxes|infoboxes]]. {{crossref|printworthy=y|(For more information, see {{section link|Wikipedia:Manual of Style#Scrolling lists and collapsible content}}.)}} This option {{em|is}} permissible in [[Wikipedia:Navigation template|navboxes]], which are not part of the article content {{lang|la|per se}}. ===Slashes and the {{samp|nobase}} parameter === If the template name given to {{tnull|Collapsible option}} includes a forward-slash (virgule) character β <kbd>/</kbd> β then the parameter {{para|nobase}} (set to {{kbd|on}}, {{kbd|true}}, etc.) will need to be added so that the name is displayed correctly (i.e., so that {{tlc|PAGENAME}} rather than the default {{tlc|BASEPAGENAME}} is used to display it). == See also == * {{tl|Navbox documentation}}, which includes this template * {{tl|Collapsible lists option}} * {{tl|Collapsible sections option}} * [[Help:Collapsing tables and more|Collapsing tables and more]] <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Documentation shared content templates]] [[Category:Wikipedia metatemplates]] }}</includeonly>
Summary:
By saving changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Ambox globe
(
edit
)
Template:Ambox globe current red
(
edit
)
Template:Collapsible option
(
edit
)
Template:Crossref
(
edit
)
Template:Crossreference
(
edit
)
Template:Crossreference/styles.css
(
edit
)
Template:Documentation subpage
(
edit
)
Template:Em
(
edit
)
Template:Hatnote inline
(
edit
)
Template:High-use
(
edit
)
Template:Kbd
(
edit
)
Template:Kbd/styles.css
(
edit
)
Template:Lang
(
edit
)
Template:Main other
(
edit
)
Template:Mbox
(
edit
)
Template:Para
(
edit
)
Template:Param value
(
edit
)
Template:Replace
(
edit
)
Template:SUBJECTSPACE formatted
(
edit
)
Template:Samp
(
edit
)
Template:Sandbox other
(
edit
)
Template:Section link
(
edit
)
Template:Spaced en dash
(
edit
)
Template:Spaced ndash
(
edit
)
Template:Strong
(
edit
)
Template:Tag
(
edit
)
Template:Template link
(
edit
)
Template:Template link code
(
edit
)
Template:Template link expanded
(
edit
)
Template:Template link null
(
edit
)
Template:Template other
(
edit
)
Template:Terminate sentence
(
edit
)
Template:Tl
(
edit
)
Template:Tlc
(
edit
)
Template:Tlx
(
edit
)
Template:Tnull
(
edit
)
Template:Update
(
edit
)
Template:Var
(
edit
)
Module:Arguments
(
view source
) (protected)
Module:Hatnote
(
edit
)
Module:Hatnote/styles.css
(
edit
)
Module:Hatnote inline
(
edit
)
Module:High-use
(
edit
)
Module:Lang
(
edit
)
Module:Lang/ISO 639 synonyms
(
edit
)
Module:Lang/configuration
(
edit
)
Module:Lang/data
(
edit
)
Module:Lang/data/iana languages
(
edit
)
Module:Lang/data/iana regions
(
edit
)
Module:Lang/data/iana scripts
(
edit
)
Module:Lang/data/iana suppressed scripts
(
edit
)
Module:Lang/data/iana variants
(
edit
)
Module:Lang/data/is latn data
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Section link
(
edit
)
Module:String
(
edit
)
Module:Template link general
(
edit
)
Module:Text
(
edit
)
Module:Text/data
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/C
(
edit
)
Module:Unicode data
(
edit
)
Module:Unsubst
(
edit
)
Module:Yesno
(
view source
) (protected)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Community portal
Current events
Recent changes
Random page
Help
Donate
Tools
What links here
Related changes
Upload file
Special pages
Page information