Difference between revisions of "Template:Template"

From SoftMC-Wiki
Jump to: navigation, search
m (Draft)
 
m (Examples)
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly><!-- 
{{{description}}}
 
  
== Template ==
+
### page settings
{{{template}}}
+
-->__NOTOC__<!--
{{#if:{{{parameters|}}}
+
 
=== Parameters ===
+
 
{{#tag:pre|{{{parameters}}}}}
+
### MAIN
}}
+
-->{{{description}}}
{{#if:{{{operation|}}}
+
 
=== Operation ===
+
= Template =
 +
{{#tag:pre|{{{template}}}}}<!--
 +
 
 +
## PARAMETERS
 +
-->{{#if:{{{parameters|}}}|:
 +
== Parameters ==
 +
{{{parameters}}}
 +
}}<!--
 +
 
 +
## OPERATIONS
 +
-->{{#if:{{{operation|}}}|:
 +
== Operation ==
 
{{{operation}}}
 
{{{operation}}}
 
}}
 
}}
== Examples ==
+
= Examples =
 
{{{examples}}}
 
{{{examples}}}
  
For more examples refer to pages, which use this template: [[Special:WhatLinksHere/{{FULLPAGENAME}}]]
+
----
 +
For more examples refer to pages, which use this template: [[Special:WhatLinksHere/{{FULLPAGENAME}}|What links here]].
 +
 
 +
[[Help:Templates]] describes general usage of templates, including treatment of special characters.
 
</includeonly><!--  
 
</includeonly><!--  
 +
  
  
 
### TEMPLATE DESCRIPTION
 
### TEMPLATE DESCRIPTION
-->
+
--><noinclude>
<noinclude>
 
 
{{Template
 
{{Template
 
|description=
 
|description=
 +
This template should be used to add a description to all other templates.
 +
 +
Within a template page, the description has to be enclosed by <code>{{/tag|noinclude}}{{/tag|/noinclude}}</code>, so it is not shown on the page, which uses the template (see examples).
  
 
|template=
 
|template=
 +
<nowiki>
 
{{Template
 
{{Template
 
|description=
 
|description=
Line 33: Line 50:
 
|examples=
 
|examples=
 
}}
 
}}
 +
</nowiki>
  
 
|parameters=
 
|parameters=
Line 39: Line 57:
 
;template
 
;template
 
: Prototype of the template definition, which can be copied and pasted to the place of use.
 
: Prototype of the template definition, which can be copied and pasted to the place of use.
 +
: The content has to be enclosed into <code><nowiki><nowiki></nowiki></nowiki></code>, so it is not treated as a template itself.
 
;parameters (optional)
 
;parameters (optional)
 
: Template parameters description.
 
: Template parameters description.
Line 50: Line 69:
  
 
|examples=
 
|examples=
<pre>
+
The source code of this template is the best example! :)
</pre>
 
 
}}
 
}}
 
+
<br/><br/>
 +
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 14:06, 26 August 2014

This template should be used to add a description to all other templates.

Within a template page, the description has to be enclosed by <noinclude></noinclude>, so it is not shown on the page, which uses the template (see examples).

Template

{{Template
|description=
|template=
|parameters=
|operation=
|examples=
}}

Parameters

description
Main description of the template.
template
Prototype of the template definition, which can be copied and pasted to the place of use.
The content has to be enclosed into <nowiki></nowiki>, so it is not treated as a template itself.
parameters (optional)
Template parameters description.
operation (optional)
Description of automatic operations of the template.
examples
Please provide at least one example!

Operation

This template does not provide any automatic operations.

Examples

The source code of this template is the best example! :)


For more examples refer to pages, which use this template: What links here.

Help:Templates describes general usage of templates, including treatment of special characters.