FANDOM


Line 1: Line 1:
This article covers the general layout for a standard template page.
+
This article covers the '''general layout for a standard template page'''.
   
  +
==Procedure==
 
*Put the template code on the main page, and put all documentation and categories on a /doc subpage. This means that updates to the documentation do not result in huge amounts of template updates, and the template itself can be protected if necessary.
 
*Put the template code on the main page, and put all documentation and categories on a /doc subpage. This means that updates to the documentation do not result in huge amounts of template updates, and the template itself can be protected if necessary.
   
+
==Sample pages==
 
;Template page
 
;Template page
 
<pre>
 
<pre>
Line 17: Line 18:
 
;Syntax
 
;Syntax
 
:Type <code>{{t|template}}</code> somewhere.
 
:Type <code>{{t|template}}</code> somewhere.
  +
;Sample output
  +
:<code><nowiki>{{template|foo}}</nowiki></code> gives...
  +
:{{template|foo}}
   
 
<includeonly>Categories for the template</includeonly>
 
<includeonly>Categories for the template</includeonly>

Revision as of 15:53, November 13, 2008

This article covers the general layout for a standard template page.

Procedure

  • Put the template code on the main page, and put all documentation and categories on a /doc subpage. This means that updates to the documentation do not result in huge amounts of template updates, and the template itself can be protected if necessary.

Sample pages

Template page
Template code<includeonly>Any categories to be inserted into articles by the template</includeonly><noinclude>
{{documentation}}</noinclude>


Template/doc page
;Description
:This template is used to do something.
;Syntax
:Type <code>{{t|template}}</code> somewhere.
;Sample output
:<code>{{template|foo}}</code> gives...
:{{template|foo}}

<includeonly>Categories for the template</includeonly>
Community content is available under CC-BY-SA unless otherwise noted.