Help:Templates

From WeRelate

Contents

What are Templates?

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

How do I create a Template?

To create a template, just create a link of the form [[Template:Template title]].

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

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}}

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
  • Watercooler discussion

Merge Template

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

Related Pages

Menu
Views
Toolbox
Personal tools