Soyjak Wiki:Template/What are templates?

From Soyjak Wiki, the free ensoyclopedia
Jump to navigationJump to search

Templates are the lifeblood of the ‘ki, gemmy infoboxes that act like functions in code. You make them once, then you can easily just reuse them again. Reuse, reduce, recycle.

Most templates have dedicated documentation available for how they can be used, as well as examples.

Examples[edit | edit source]

Below are two examples of how (You) can add templates using both of the editors available on this very wiki, for this example we use the {{Awardbox}} template.

Using the Visual Editor[edit | edit source]

Typing {{ will automatically open the insert Template dialog.

This is for the editor accessed using the "edit" button at the top of the page.

To insert the Awardbox template, go to the editor bar at the top of the page and press the "Insert" dropdown, then Navigate to "Templates".

From here you can search for the Awardbox template, from here you'll need to enable the parameters you wish to use and fill them in with the respective information, or be left blank for the default options.

Using the Source Editor[edit | edit source]

This is for the editor accessed using the "edit source" button at the top of the page.

To insert the Awardbox template, simply type {{Awardbox}}

posted it again award

Since no parameter was given to the template, a default message will be used instead. To append a parameter, simply type {{Awardbox|MEDS MEDS MEDS}} in the source code, which renders as:

MEDS MEDS MEDS award

Note that some templates use named parameters, and require the parameter name to be written out. These are documented on the respective template pages.