Difference between revisions of "Template:Template Overview"

m
m (Turns out the Clear was dumb, but the NOEDITSECTION was important.)
 
(51 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Template:Template Explanation
+
<noinclude>{{Template Overview
|usedon=template pages
+
|usedon=template
|purpose=display the general template information and the template code for copying, pasting, and using in pages
+
|purpose=display the general template information and the required template text for copying, pasting, and using in pages
|template={{tocright}}
+
|template=<nowiki>{{Template Overview
[[{{NAMESPACE}}:{{PAGENAME}}]] is designed for use on to . {{#if: | | }}
+
|usedon=
 
+
|purpose=
 +
|othernotes=
 +
|template=
 +
|display=
 +
|parameters=
 +
|category=
 +
}}</nowiki>
 +
|category=Information
 +
}}
 +
{{Template Parameter
 +
|name=usedon
 +
|usage=mandatory
 +
|takes=a string or strings
 +
|denotes=the type or types of pages this template is designed for use on
 +
|generates=the middle of the template description's introductory sentence
 +
|validvalues=Any string or strings.
 +
}}
 +
{{Template Parameter
 +
|name=purpose
 +
|usage=mandatory
 +
|takes=a string or strings
 +
|denotes=what the template was designed to do or display
 +
|generates=the end of the template description's introductory sentence
 +
|validvalues=Any string or strings.
 +
}}
 +
{{Template Parameter
 +
|name=othernotes
 +
|takes=a string or strings
 +
|denotes=any further relevant information about the usage or functionality of the template
 +
|generates=a sentence or sentences after the template description's introductory sentence
 +
|validvalues=Any string or strings.
 +
}}
 +
{{Template Parameter
 +
|name=template
 +
|usage=mandatory
 +
|takes=a string or strings
 +
|denotes=the actual text of the template that a user must copy and paste onto a page in order to use the template
 +
|generates=the "Template" section
 +
|othernotes=When entered into the Template Explanation template, the template's transclusion code must be enclosed in {{Monospace|<nowiki><nowiki></nowiki></nowiki>}} tags, or else the template itself will be transcluded into the {{Monospace|<nowiki><pre></pre></nowiki>}} block.
 +
|validvalues=The text of the template for transclusion enclosed by {{Monospace|<nowiki><nowiki></nowiki></nowiki>}} tags.
 +
}}
 +
{{Template Parameter
 +
|name=display
 +
|takes=a string
 +
|denotes=whether an example of the template should be displayed
 +
|generates=the "Display" section
 +
|validvalues="yes" to automatically display the template in its entirety, or any string or strings making up the display of the template.
 +
}}
 +
{{Template Parameter
 +
|name=parameters
 +
|usage=mandatory
 +
|takes=a string
 +
|denotes=whether the template has parameters or not
 +
|generates=either a blank space beneath the "Parameters" section if the parameter is left out or left blank, or a boilerplate message indicating that there are no parameters if a "none" is supplied
 +
|validvalues="none" or blank
 +
}}
 +
{{Template Parameter
 +
|name=category
 +
|usage=mandatory
 +
|takes=a string
 +
|denotes=the template-related category in which to place the template
 +
|generates=the template page's category
 +
|validvalues=Any string or strings.
 +
}}
 +
</noinclude><includeonly>__NOEDITSECTION__
 +
{{tocright}}
 +
[[{{NAMESPACE}}:{{PAGENAME}}]] is designed for use on {{{usedon}}} pages to {{{purpose}}}. {{#if: {{{othernotes|}}} | {{{othernotes}}} | }}
 
==Template==
 
==Template==
<pre>
+
{{Pre | {{{template}}} }}
{{{template}}}
+
{{#if: {{{display|}}}
</pre>
+
| {{#ifeq: {{{display}}} | yes
 
+
  | ==Display==
 +
{{ {{PAGENAME}} }}
 +
  | ==Display==
 +
{{{display}}}
 +
  }}
 +
}}
 
==Parameters==
 
==Parameters==
 
+
{{#switch: {{{parameters}}}
}}</noinclude><includeonly>{{tocright}}
+
| none = This template has no parameters.
[[{{NAMESPACE}}:{{PAGENAME}}]] is designed for use on {{{usedon}}} to {{{purpose}}}. {{#if: {{{othernotes|}}} | {{{othernotes}}} | }}
+
|
 
+
| #default =
==Template==
+
}}
<pre>
+
{{Categorize|{{{category}}} Templates}}</includeonly>
{{{template}}}
+
</pre>
+
 
+
==Parameters==
+
</includeonly>
+

Latest revision as of 21:14, 2 January 2012

Template:Template Overview is designed for use on template pages to display the general template information and the required template text for copying, pasting, and using in pages.

Template

{{Template Overview
|usedon=
|purpose=
|othernotes=
|template=
|display=
|parameters=
|category=
}}

Parameters

usedon

  • Usage: Mandatory
  • Description: The usedon parameter takes a string or strings denoting the type or types of pages this template is designed for use on. This is used to generate the middle of the template description's introductory sentence.
  • Valid Value(s): Any string or strings.

purpose

  • Usage: Mandatory
  • Description: The purpose parameter takes a string or strings denoting what the template was designed to do or display. This is used to generate the end of the template description's introductory sentence.
  • Valid Value(s): Any string or strings.

othernotes

  • Usage: Optional
  • Description: The othernotes parameter takes a string or strings denoting any further relevant information about the usage or functionality of the template. This is used to generate a sentence or sentences after the template description's introductory sentence.
  • Valid Value(s): Any string or strings.

template

  • Usage: Mandatory
  • Description: The template parameter takes a string or strings denoting the actual text of the template that a user must copy and paste onto a page in order to use the template. This is used to generate the "Template" section. When entered into the Template Explanation template, the template's transclusion code must be enclosed in <nowiki></nowiki> tags, or else the template itself will be transcluded into the <pre></pre> block.
  • Valid Value(s): The text of the template for transclusion enclosed by <nowiki></nowiki> tags.

display

  • Usage: Optional
  • Description: The display parameter takes a string denoting whether an example of the template should be displayed. This is used to generate the "Display" section.
  • Valid Value(s): "yes" to automatically display the template in its entirety, or any string or strings making up the display of the template.

parameters

  • Usage: Mandatory
  • Description: The parameters parameter takes a string denoting whether the template has parameters or not. This is used to generate either a blank space beneath the "Parameters" section if the parameter is left out or left blank, or a boilerplate message indicating that there are no parameters if a "none" is supplied.
  • Valid Value(s): "none" or blank

category

  • Usage: Mandatory
  • Description: The category parameter takes a string denoting the template-related category in which to place the template. This is used to generate the template page's category.
  • Valid Value(s): Any string or strings.