Jump to content

Template:-

From Worm Wiki
Revision as of 05:27, December 13, 2014 by Gesshoku (talk | contribs) (Created page with "{{Documentation subpage}} Use {{tl|{{BASEPAGENAME}}}} after any floating elements and before elements you do not wish to float together with the fir...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Documentation subpage

{{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}
) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }}

Use Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

after any floating elements and before elements you do not wish to float together with the first set. This uses a line break, which may introduce an ugly extra blank line. If you want to avoid that, use Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

instead. Do not use this template to deliberately add whitespace and blank lines between non-floating elements.

Details

Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

contains the markup:
<br style="clear:both;" />

(the correct syntax for the old HTML markup <br clear=both>). This causes any previously established float to clear.

Optionally, you can clear only left- or right floating elements by using {{-|left}} or {{-|right}}.

The unusual name of this template is a mnemonic for an imaginary horizontal line, which separates floating elements above from those below. Some editors prefer the mnemonic Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

("clear"), which simply redirects here. However, do not confuse Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

with Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }} , which is a different template that uses <div></div> instead of <br /> and so does not introduce an extra line break.

Examples

Template:Sidebar

First

In the first example {{-}} on a new line after the word browser guarantees that the table does not float into the second example. (Placing it directly after the word browser doesn't work in Google Chrome.)

  • Cute, but less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Documentation subpage

{{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}
) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }}

Use Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

after any floating elements and before elements you do not wish to float together with the first set. This uses a line break, which may introduce an ugly extra blank line. If you want to avoid that, use Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

instead. Do not use this template to deliberately add whitespace and blank lines between non-floating elements.

Details

Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

contains the markup:
<br style="clear:both;" />

(the correct syntax for the old HTML markup <br clear=both>). This causes any previously established float to clear.

Optionally, you can clear only left- or right floating elements by using {{-|left}} or {{-|right}}.

The unusual name of this template is a mnemonic for an imaginary horizontal line, which separates floating elements above from those below. Some editors prefer the mnemonic Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

("clear"), which simply redirects here. However, do not confuse Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

with Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }} , which is a different template that uses <div></div> instead of <br /> and so does not introduce an extra line break.

Examples

Template:Sidebar

First

In the first example {{-}} on a new line after the word browser guarantees that the table does not float into the second example. (Placing it directly after the word browser doesn't work in Google Chrome.)

  • Cute, but less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

Template loop detected: Template:- Template:Sidebar


Second

In the second example the position of {{-}} is after the word but. Note that it does not affect the left margin of the bullet * list, because it is used inside of it.

  • Cute, butTemplate loop detected: Template:-less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

Template:Sidebar


Third

The third example has a new line after the word but and {{-}} after the word browser.

  • Cute, but

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.Template loop detected: Template:- Template:Sidebar


Fourth

The fourth example has {{-}} and a new line after the word but.

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

TemplateData

Template:TemplateDataHeader <TemplateData> {

       "description": "This template adds the HTML tag 'clear:both' to the page, which clear any previously defined floats. This template has no parameters",
       "params": {}

} </TemplateData>

See also

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until left column is complete.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until right column is complete.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until both columns are complete.

Template:Sidebar


Second

In the second example the position of {{-}} is after the word but. Note that it does not affect the left margin of the bullet * list, because it is used inside of it.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Documentation subpage

{{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}
) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }}

Use Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

after any floating elements and before elements you do not wish to float together with the first set. This uses a line break, which may introduce an ugly extra blank line. If you want to avoid that, use Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

instead. Do not use this template to deliberately add whitespace and blank lines between non-floating elements.

Details

Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

contains the markup:
<br style="clear:both;" />

(the correct syntax for the old HTML markup <br clear=both>). This causes any previously established float to clear.

Optionally, you can clear only left- or right floating elements by using {{-|left}} or {{-|right}}.

The unusual name of this template is a mnemonic for an imaginary horizontal line, which separates floating elements above from those below. Some editors prefer the mnemonic Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

("clear"), which simply redirects here. However, do not confuse Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

with Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }} , which is a different template that uses <div></div> instead of <br /> and so does not introduce an extra line break.

Examples

Template:Sidebar

First

In the first example {{-}} on a new line after the word browser guarantees that the table does not float into the second example. (Placing it directly after the word browser doesn't work in Google Chrome.)

  • Cute, but less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

Template loop detected: Template:- Template:Sidebar


Second

In the second example the position of {{-}} is after the word but. Note that it does not affect the left margin of the bullet * list, because it is used inside of it.

  • Cute, butTemplate loop detected: Template:-less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

Template:Sidebar


Third

The third example has a new line after the word but and {{-}} after the word browser.

  • Cute, but

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.Template loop detected: Template:- Template:Sidebar


Fourth

The fourth example has {{-}} and a new line after the word but.

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

TemplateData

Template:TemplateDataHeader <TemplateData> {

       "description": "This template adds the HTML tag 'clear:both' to the page, which clear any previously defined floats. This template has no parameters",
       "params": {}

} </TemplateData>

See also

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until left column is complete.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until right column is complete.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until both columns are complete.

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser. Template:Sidebar


Third

The third example has a new line after the word but and {{-}} after the word browser.

  • Cute, but

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Documentation subpage

{{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}
) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }}

Use Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

after any floating elements and before elements you do not wish to float together with the first set. This uses a line break, which may introduce an ugly extra blank line. If you want to avoid that, use Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

instead. Do not use this template to deliberately add whitespace and blank lines between non-floating elements.

Details

Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

contains the markup:
<br style="clear:both;" />

(the correct syntax for the old HTML markup <br clear=both>). This causes any previously established float to clear.

Optionally, you can clear only left- or right floating elements by using {{-|left}} or {{-|right}}.

The unusual name of this template is a mnemonic for an imaginary horizontal line, which separates floating elements above from those below. Some editors prefer the mnemonic Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

("clear"), which simply redirects here. However, do not confuse Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

with Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }} , which is a different template that uses <div></div> instead of <br /> and so does not introduce an extra line break.

Examples

Template:Sidebar

First

In the first example {{-}} on a new line after the word browser guarantees that the table does not float into the second example. (Placing it directly after the word browser doesn't work in Google Chrome.)

  • Cute, but less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

Template loop detected: Template:- Template:Sidebar


Second

In the second example the position of {{-}} is after the word but. Note that it does not affect the left margin of the bullet * list, because it is used inside of it.

  • Cute, butTemplate loop detected: Template:-less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

Template:Sidebar


Third

The third example has a new line after the word but and {{-}} after the word browser.

  • Cute, but

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.Template loop detected: Template:- Template:Sidebar


Fourth

The fourth example has {{-}} and a new line after the word but.

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

TemplateData

Template:TemplateDataHeader <TemplateData> {

       "description": "This template adds the HTML tag 'clear:both' to the page, which clear any previously defined floats. This template has no parameters",
       "params": {}

} </TemplateData>

See also

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until left column is complete.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until right column is complete.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until both columns are complete.

Template:Sidebar


Fourth

The fourth example has {{-}} and a new line after the word but.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Documentation subpage

{{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}
) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }}

Use Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

after any floating elements and before elements you do not wish to float together with the first set. This uses a line break, which may introduce an ugly extra blank line. If you want to avoid that, use Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

instead. Do not use this template to deliberately add whitespace and blank lines between non-floating elements.

Details

Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

contains the markup:
<br style="clear:both;" />

(the correct syntax for the old HTML markup <br clear=both>). This causes any previously established float to clear.

Optionally, you can clear only left- or right floating elements by using {{-|left}} or {{-|right}}.

The unusual name of this template is a mnemonic for an imaginary horizontal line, which separates floating elements above from those below. Some editors prefer the mnemonic Template loop detected: Template:Documentation subpage

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

("clear"), which simply redirects here. However, do not confuse Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

with Template loop detected: Template:Documentation subpage 

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }} , which is a different template that uses <div></div> instead of <br /> and so does not introduce an extra line break.

Examples

Template:Sidebar

First

In the first example {{-}} on a new line after the word browser guarantees that the table does not float into the second example. (Placing it directly after the word browser doesn't work in Google Chrome.)

  • Cute, but less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

Template loop detected: Template:- Template:Sidebar


Second

In the second example the position of {{-}} is after the word but. Note that it does not affect the left margin of the bullet * list, because it is used inside of it.

  • Cute, butTemplate loop detected: Template:-less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

Template:Sidebar


Third

The third example has a new line after the word but and {{-}} after the word browser.

  • Cute, but

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.Template loop detected: Template:- Template:Sidebar


Fourth

The fourth example has {{-}} and a new line after the word but.

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

TemplateData

Template:TemplateDataHeader <TemplateData> {

       "description": "This template adds the HTML tag 'clear:both' to the page, which clear any previously defined floats. This template has no parameters",
       "params": {}

} </TemplateData>

See also

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until left column is complete.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until right column is complete.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until both columns are complete.

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

TemplateData

Template:TemplateDataHeader <TemplateData> {

       "description": "This template adds the HTML tag 'clear:both' to the page, which clear any previously defined floats. This template has no parameters",
       "params": {}

} </TemplateData>

See also

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until left column is complete.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until right column is complete.

Usage

{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Userbox documentation

To set this template to use "userbox" and "userbox page" rather than "template" and "template page" or "user template" and "user template page", use:

{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}
or
{{{{#if:|subst:|{{#if:|:| }}}}Userbox documentation subpage {{#if:[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]||[[Template loop detected: Template:Documentation subpage

This template is to help facilitate the displaying of variable names (in mathematics, computer source code, wikimarkup, etc.) with the semantically correct Template:Tag tags, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing for many reasons, including accessibility, separation of presentation and content, semantic Web, and metadata; In XHTML and HTML, the Template:Tag element has semantic meaning, while simple italicization does not. "Variable" in this sense may include arbitrary or unknown names or terms, example human input, arithmetical variables in equations, etc. This template (and the underlying XHTML) are generally Template:Em used if MediaWiki's Template:Tag tags (or any other stand-alone mathematical markup) are being used.

Example
Template:Tlxb

outputs the following HTML:

Template:Tag

which renders as:

Template loop detected: Template:Var

Note that on the screen or in print, this renders as simple italicization, as does Template:Code (using pairs of apostrophes) or Template:Tag (using HTML), yet it carries more semantic meaning than either of these methods.

At times, you may wish to use a serif font. This is especially true when attempting to render single-letter variables like "I" (upper-case "i") and "l" (lower-case "L"), since they are nearly indistinguishable (if at all). In such situations, use the {{{{#if:|subst:|{{#if:|:| }}}}varserif{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}} template instead of Template:Tnull, to make them more distinguishable, like these serif examples: Template:Varserif, Template:Varserif.

More examples


Template:Semantic markup templates ]]}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||{{{10}}}}}{{#if:||{{{11}}}}}{{#if:||{{{12}}}}}{{#if:||{{{13}}}}}{{#if:||{{{14}}}}}{{#if:||{{{15}}}}}{{#if:||etc.}}}}

Text customization

The parameters Template:Para and/or Template:Para can be used to set the text of, respectively, the template's first and second lines. If text1 is set but not text2, both lines' text will derive from text1: Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here''''' |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text2='''''text2 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end Template:Hidden begin {{Documentation subpage |text1='''''text1 appears here'''''}} Template:Float Template loop detected: Template:Documentation subpage Template:Hidden end

Display

This template should normally be placed at the top of /doc pages. It changes output depending on where it is viewed:

  • On a /doc page, it displays a box explaining template documentation and links to the template page.
  • On other pages – i.e. pages transcluding the /doc page – the template will not show. The template page itself (which contains Template loop detected: Template:Tl) will automatically note that the documentation is transcluded from a subpage.

Functions

In addition to its message, the template adds pages to Category:Template documentation pages, Category:User documentation pages, or similar (named after the subject space), but only for documentation pages in namespaces with the subpage feature. It defaults the sort key to the page name without namespace: Template:Foo, for example, would be sorted as "Foo", i.e. under "F".

See also

Template:Documentation/see also

{{#ifeq:-|sandbox | |

tn:Template:Documentation subpage }} {{#ifeq:Template:- | Template:Tl | Template:High-risk }}

Template:Commons The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is that the code:

{{tl|Example}}
generates
Template loop detected: Template:Tl

<templatedata>{ "description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.", "params": {

 "1": {
   "label": "template name",
   "description": "the template name without the namespace prefix “Template:”, which is added automatically",
   "type": "string",
   "required": true
 }

}}</templatedata>

More complex variations are described below.

Example

Code Result Notes
{{tl|Void}} {{Void}} Standard usage
{{tls|Void}} {{subst:Example}} For templates that should be substituted
{{tl2|X1}} {{X1}} This formats the link to show how it would look in code
{{tl2|SISTER=M:|3x}} {{3x}} Same as above, for templates on another Wikimedia project (such as meta)
{{tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}} For templates on another language project
{{tl|1==)}} Template loop detected: Template:Tl Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template loop detected: Template:Tl or Template loop detected: Template:Tl

See also

Template:Template-linking templates


{{#ifeq:-|sandbox | | }}

Delays content until both columns are complete.