Template:Expand/doc View history

m (PesachZ moved page User:PesachZ/Expand/doc to Template:Expand/doc: Publishing)
m (Removed {{DraftLink}})
Line 1: Line 1:
{{doc subpage}}
{{doc subpage}}
<!-- ADD DOCUMENTATION BELOW THIS LINE -->
<!-- ADD DOCUMENTATION BELOW THIS LINE -->
{{Tlx|{{DraftLink|Expand}}|content or link to transclude|description for header|nt{{=}}yes|section{{=}}#1-4|editlink{{=}}no|summary{{=}}A short text summary|expand{{=}}yes}}
{{Tlx|Expand|content or link to transclude|description for header|nt{{=}}yes|section{{=}}#1-4|editlink{{=}}no|summary{{=}}A short text summary|expand{{=}}yes}}


This template takes two unnamed parameters in order, and some additional named parameters to alter the output.
This template takes two unnamed parameters in order, and some additional named parameters to alter the output.
Line 29: Line 29:
== Sample ==
== Sample ==


<code><nowiki>{{{{DraftLink|Expand}}|(LINK)}}</nowiki></code><br />
<code><nowiki>{{Expand|(LINK)}}</nowiki></code><br />


<code><nowiki>{{{{DraftLink|Expand}}|/(LINK)}}</nowiki></code><br />
<code><nowiki>{{Expand|/(LINK)}}</nowiki></code><br />


<code><nowiki>{{{{DraftLink|Expand}}|/(LINK)|(HEADER)}}</nowiki></code><br />
<code><nowiki>{{Expand|/(LINK)|(HEADER)}}</nowiki></code><br />


<code><nowiki>{{{{DraftLink|Expand}}|(CONTENT)|(HEADER)|nt=yes}}</nowiki></code><br />
<code><nowiki>{{Expand|(CONTENT)|(HEADER)|nt=yes}}</nowiki></code><br />


<code><nowiki>{{ {{DraftLink|Expand}}}}</nowiki></code><br />
<code><nowiki>{{ Expand}}</nowiki></code><br />


<code><nowiki>{{{{DraftLink|Expand}}|/(LINK)|section=2}}</nowiki></code><br />
<code><nowiki>{{Expand|/(LINK)|section=2}}</nowiki></code><br />


<code><nowiki>{{{{DraftLink|Expand}}|/(LINK)|(HEADER)|section=2}}</nowiki></code><br />
<code><nowiki>{{Expand|/(LINK)|(HEADER)|section=2}}</nowiki></code><br />


<code><nowiki>{{{{DraftLink|Expand}}|/(LINK)|(HEADER)|section=2|newscript=yes|summary=This is a subsection dedicated to HEADER}}</nowiki></code><br />
<code><nowiki>{{Expand|/(LINK)|(HEADER)|section=2|newscript=yes|summary=This is a subsection dedicated to HEADER}}</nowiki></code><br />


<code><nowiki>{{{{DraftLink|Expand}}|/(LINK)|(HEADER)|section=2|newscript=yes|edit=/(LINK)|summary=This is a subsection dedicated to HEADER|expand=yes}}</nowiki></code><br />
<code><nowiki>{{Expand|/(LINK)|(HEADER)|section=2|newscript=yes|edit=/(LINK)|summary=This is a subsection dedicated to HEADER|expand=yes}}</nowiki></code><br />


PRODUCES
PRODUCES


{{{{DraftLink|Expand}}|(LINK)}}
{{Expand|(LINK)}}
----
----
{{{{DraftLink|Expand}}|/(LINK)}}
{{Expand|/(LINK)}}
----
----
{{{{DraftLink|Expand}}|/(LINK)|(HEADER)}}
{{Expand|/(LINK)|(HEADER)}}
----
----
{{{{DraftLink|Expand}}|(CONTENT)|(HEADER)|nt=yes}}
{{Expand|(CONTENT)|(HEADER)|nt=yes}}
----
----
{{ {{DraftLink|Expand}}}}
{{ Expand}}
----
----
{{{{DraftLink|Expand}}|/(LINK)|section=2}}
{{Expand|/(LINK)|section=2}}
----
----
{{{{DraftLink|Expand}}|/(LINK)|(HEADER)|section=2}}
{{Expand|/(LINK)|(HEADER)|section=2}}
----
----
{{{{DraftLink|Expand}}|/(LINK)|(HEADER)|section=2|newscript=yes|summary=This is a subsection dedicated to HEADER}}
{{Expand|/(LINK)|(HEADER)|section=2|newscript=yes|summary=This is a subsection dedicated to HEADER}}
----
----
{{{{DraftLink|Expand}}|/(LINK)|(HEADER)|section=2|newscript=yes|edit=/(LINK)|summary=This is a subsection dedicated to HEADER|expand=yes}}
{{Expand|/(LINK)|(HEADER)|section=2|newscript=yes|edit=/(LINK)|summary=This is a subsection dedicated to HEADER|expand=yes}}
----
----


Line 75: Line 75:
*{{tl|Collapsible section bottom}}
*{{tl|Collapsible section bottom}}
This template is used by:
This template is used by:
*{{tl|{{DraftLink|Scripts/NewScript}}}}
*{{tl|NewScript}}
<includeonly>
<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
<!-- ADD CATEGORIES BELOW THIS LINE -->

Revision as of 07:59, 12 July 2015

This is a documentation subpage for Template:Expand.
It contains usage information, categories and other content that is not part of the original template page.

{{Expand|content or link to transclude|description for header|nt=yes|section=#1-4|editlink=no|summary=A short text summary|expand=yes}}

This template takes two unnamed parameters in order, and some additional named parameters to alter the output.

It creates a collapsible section on a page, with a heading and optional summary text text. The heading may be formatted as a section header (level 1-5) which will appear in the TOC.

At the top of the collapsed section, if the content is being transcluded from another source, a link to edit the source directly is displayed by default.


|either a nugget/subpage link, or raw content= *required if left blank will produce an error.

|description text to be used in header line= if left blank it will use the {{SUBPAGENAME}} of the first parameter.

|nt=yes content is raw (do not enclose in curly braces for transclusion).

|section=# any number 1-4, if anything else is entered it defaults to 5. This replaces the header test with just the description from the 2nd parameter (or the {{SUBPAGENAME}} of the 1st parameter, and formats it as a section header. The number entered is the header level used.

|newscript=yes Designed to detect input from the {{NewScript}} template, and is not meant to be used manually. It generate a preload link for a script nugget, if the defined subpage does not exist yet. If the defined subpage exists already it produces a direct link to the nugget above the transclusion.

|summary=short descriptive summary This parameter is only available if the |section=# parameter is also used. It allows you to define a very short summary text to be displayed in the header of the collapsible section.

|editlink=no If this parameter is defined the link to edit the nugget is not displayed.

|expand=yes If defined, the section will be expanded by default when the page is loaded.


Sample

{{Expand|(LINK)}}

{{Expand|/(LINK)}}

{{Expand|/(LINK)|(HEADER)}}

{{Expand|(CONTENT)|(HEADER)|nt=yes}}

{{ Expand}}

{{Expand|/(LINK)|section=2}}

{{Expand|/(LINK)|(HEADER)|section=2}}

{{Expand|/(LINK)|(HEADER)|section=2|newscript=yes|summary=This is a subsection dedicated to HEADER}}

{{Expand|/(LINK)|(HEADER)|section=2|newscript=yes|edit=/(LINK)|summary=This is a subsection dedicated to HEADER|expand=yes}}

PRODUCES

Click Expand for details on (LINK)


Click Expand for details on /(LINK)


Click Expand for details on (HEADER)


Click Expand for details on (HEADER)

(CONTENT)


Click Expand for details on


{{ ERROR: No content was specified }}




(HEADER) link to this section

This is a subsection dedicated to HEADER

(HEADER) link to this section

This is a subsection dedicated to HEADER


See Also

This template relies on:

This template is used by: