Advance Template Usage

From Warmachine University Archive
Jump to navigation Jump to search

Info icon.png

This page is a WIP

Some of the existing advanced templates can be found here: Category:Templates. Unfortunately not all of them have been added to a proper category (yet).

General template usage

Templates are pages with predefined code/text that you may call with {{template name}}.

Some templates may also have parameters passed to it (depending on whether this is added to the template) that is inserted at certain places in the template. There are two ways templates accept parameters:

  1. Anonymous parameters - the template output the parameters based on the order in which the parameters are passed in
    • To insert Anonymous parameters call the template as usuall, but add the parameters after the template name seperated by "pipes", |, like so:
      {{template name|my parameter value 1|my parameter value 2}}
    • The "pipe" character is not a lower-case L or an upper-case i. It is located between your Backspace and Enter keys (on a normal qwerty keyboard).
  2. Named parameters - the template output the parameters maching the name given, the order does not matter, only that you include the parameter name
    • To insert Named parameters call the template as Anonymous parameters, but insert "parameter name=" between your value and the pipe |, like:
      {{template name|hopes=my parameter value 1|dreams=my parameter value 2}}