What are Templates?

  • Templates are clever bits of text that can be used as shorthand for saving a lot of typing time. Templates can be called on any page you want.
  • See here for a list of all pages in the Template namespace

How do I create a Template?

To create a template, select "Other page" from the "Add" menu, change the namespace to "Template", and enter the title of the template page that you want to create. This will take you to an empty page. Enter the text of the template and save the page.

Can templates have dynamic text?

Yep. In wiki language, dynamic text is called a 'parameter'. Follow the instructions at the Mediawiki help pages, until we can draft something here.

What is the "Subst" command

Ordinarily, templates must be edited on the template's page. All pages containing the template will be updated when the template page is saved. When the user edits a page containing a template, she will only see the {{Template title}}; she will not be able to view or edit the template text on the recipient page's edit screen.

The Subst commands makes the template temporary. That is, when the recipient page is saved, the current text of the template with its wiki commands is copied onto the recipient page. The recipient page is not connected to the Template page after it is saved. Any future changes to the template will not be updated on the recipient page.

This is very helpful in applications like our welcome protocol. The Welcome1 message can be edited on its template page as the system changes. Older welcomes containing the "subst" command will not be updated. But, when the new user edits his talk page, he can see all the wiki commands in the welcome message. This helps him learn to use the wiki commands.

Use the Subst command as follows {{Subst:Name of Template}}

How do I use a Template?

  • There are two ways of using each template:
  1. Straight, eg type {{Template title}}. It produces exactly what's on the template page (and changes when the template does) and cannot be edited
  2. Using the "subst" command (see above).

Help on Specific Templates

GoogleMap Template

  • GoogleMap Template
    • To use this template, add the following to your page:
      • {{googlemap|latitude|longitude|link text|label+with+plus+for+spaces|zoom level|map type}}
      • The link text, label, zoom level, and map type are optional parameters.
      • Map types:
        • m for normal map
        • k for satellite
        • h for hybrid
        • p for terrain
Note: You can't use the word "to" in the label.

Merge Template

Use this template to mark pages that are candidates to be merged with other pages.

  • Usage:
    {{Merge | dest=Name of page this will be merged with | curtalk=Name of talk page for this page | date=Current date}}

Related Pages

Index of Templates