Difference between revisions of "Template:Collapsible option/doc"

From blackwiki
Jump to navigation Jump to search
(Undid revision 493269694 by Funandtrvl (talk))
imported>CsDix
(added "Indicating optional state use" section)
Line 1: Line 1:
 
{{documentation subpage}}
 
{{documentation subpage}}
 
<!---PLEASE ADD METADATA TO THE <includeonly> SECTION AT THE BOTTOM OF THIS PAGE--->
 
<!---PLEASE ADD METADATA TO THE <includeonly> SECTION AT THE BOTTOM OF THIS PAGE--->
The {{tlx|collapsible option}} template gives a standardised message for transclusion on template pages whose templates include a ''state'' parameter (through which their collapsibility may be managed).
+
The {{tlx|collapsible option}} template gives a standardised message for [[Wikipedia:Transclusion|transclusion]] on template pages whose templates include a ''state'' parameter (through which their collapsibility may be managed).
  
 
It may be used on either the template page itself (wrapped within <tt><nowiki><noinclude></noinclude></nowiki></tt> tags), or on the template's {{tl|documentation}} subpage.
 
It may be used on either the template page itself (wrapped within <tt><nowiki><noinclude></noinclude></nowiki></tt> tags), or on the template's {{tl|documentation}} subpage.
  
===See also===
+
===Indicating optional ''state'' use===
 +
If, in a template where {{tlc|collapsible option}} has been transcluded, that template's ''state'' parameter has been enabled such that it need not be named when the template is called{{spaced ndash}}i.e. the ''state'' parameter includes <code><nowiki>{{{1| }}}</nowiki></code>, e.g.
 +
: <code><nowiki>|state = {{{state|{{{1|}}}}}}</nowiki></code>
 +
: <code><nowiki>|state = {{{state|{{{1|<noinclude>expanded</noinclude>}}}}}}</nowiki></code>
 +
: (etc)
 +
then
 +
: <code><nowiki>{{collapsible option |state optional=true}}</nowiki></code>
 +
adds the statement "Alternatively, the <code>state=</code> can be omitted" to the {{tlc|collapsible option}} message.
 +
 
 +
== See also ==
 
* {{tl|Collapsible lists option}}
 
* {{tl|Collapsible lists option}}
 
* {{tl|Collapsible sections option}}
 
* {{tl|Collapsible sections option}}

Revision as of 20:03, 2 December 2012

The {{collapsible option}} template gives a standardised message for transclusion on template pages whose templates include a state parameter (through which their collapsibility may be managed).

It may be used on either the template page itself (wrapped within <noinclude></noinclude> tags), or on the template's {{documentation}} subpage.

Indicating optional state use

If, in a template where {{collapsible option}} has been transcluded, that template's state parameter has been enabled such that it need not be named when the template is calledTemplate:Spaced ndashi.e. the state parameter includes {{{1| }}}, e.g.

|state = {{{state|{{{1|}}}}}}
|state = {{{state|{{{1|<noinclude>expanded</noinclude>}}}}}}
(etc)

then

{{collapsible option |state optional=true}}

adds the statement "Alternatively, the state= can be omitted" to the {{collapsible option}} message.

See also