MediaWiki Templates

From DataSelf Knowledge Base
Jump to navigation Jump to search

Templates are standard wiki pages whose content is designed to be embedded inside other pages. Other systems call them include files or macros.

Templates in Brief

  • A template is a page created to be included in other pages and usually contain repetitive material that might need to show up on any number of articles or pages.
  • A template named Template:foo can be de-referenced / transcluded with {{foo}}.
  • Create a new template page in the same way as an article page. Pages destined for the Template namespace must have a title that starts with "Template:".
  • Templates optionally may have parameters. Example: {{foo|parm1}}. sends the parameter value "parm1" to the foo template.

Template Coding Convention

Create a new template in the same way you would start any page. The only difference is that its page title must start with Template.

Templates follow a convention that the name is prefixed with Template:.

  • Otherwise templates are defined much as any other wiki page.
  • Prefixing the page name with "Template:" assigns the page to the Template namespace.


List of Templates

http://dataself.com/wiki/index.php?title=Special%3AAllPages&from=&to=&namespace=10


  1. Click Special pages > All pages.
  2. From Namespace: select Template.
  3. Click Go.

Template Coding Documentation

Production Templates Used ElseWhere