From The Collaboratory

Jump to: navigation, search



Templates are a quick and easy way to achieve two goals. First, to keep similar pages standardized across the Wiki, and second, to make common articles easy to create. There are many kinds of templates that can be created and applied. Most commonly, you will find these:

  • Article templates - Used to create entire articles
  • Sidebars - Used to show most relevent information in an easy to find sidebar
  • Banners - Mainly used by Wiki Adminitrators, these are often applied to pages as error flags

Using Templates

After copying a template to your article, you simply add your content after each "variable" (i.e, |summary=)

Finding a Template

If you already know the name of the template you need, you can type it into the search box as "Template:Name". If you need to search for it, click "Special pages" out of the toolbox on the bottom left, then "All pages". In the drop-down box, select "Template" and click Go. Here you will find a list of all current templates. Some frequently used templates are listed below:

Please note, this list may not be current. For a complete list, follow the above steps.

Applying a Template

After deciding which template is appropriate, go to the template page and copy the markup code in the shaded box. Be sure to get it all, starting from the open double braces "{{" to the closed double braces "}}". Paste this markup in your article. After each template variable (i.e., |summary=), add the content you wish to appear at that location within the template. To get a vague idea of what the template looks like and where your variable content will be placed, look at the template page and find the variable of interest surrounded by triple braces (i.e, {{{summary}}} ).

Creating Templates

Creating templates usually will be an Administrator's task, and should not be done by others. If you feel that you need a template, first clear it with an Administrator or ask them to create it for you.

All templates must be in the template namespace, and the template name needs to be the same as the article name. After creating your template page, follow the steps below. The are listed as they should appear on the page, line-by-line. Italicized text will be different for each template, while plain text will remain standard across all templates.

1. <noinclude>

2. Brief and descriptive introduction to your template

3. <pre><nowiki>

4. {{TemplateName


5. </nowiki></pre>

6. ''For more information about this template, please read [[Help:TemplateName]] and [[Help:Template]].''

7. </noinclude>

8. Body of the template. Contents of variables appear where you place the variable name in triple braces ( {{{Variable1}}} ).


For more advanced help, go to the Advanced template help at the MediaWiki meta-wiki. For extra-advanced template features (like if-then structures) visit the ParserFunctions help at meta-wiki.

Personal tools