Zelda Wiki:Making Templates

Templates are essentially subroutines for wiki content. In fact, making them anything but the simplest of templates requires a bit of programming skill.

Creating a Template
The easiest way is to type   to the Sandbox, and click on the red link that appears after saving or previewing. At the resulting editing page, you can create your template, which is most easily done by copying and pasting the code from a similar template; then you can just modify it.

Make sure that directly after the end of your template text (not even leaving a space nor new line!) you add  to begin any section detailing how to use the template, and also the add the necessary category for that template, and at the very end type   to enclose the section and category. Do not finish the template, create a new line, and then add the  tag.

Testing a Template
When editing a template, a "preview page with this template" option will appear at the bottom of the edit form. In the "page title" box, enter the name of a page that currently uses the template and pressing the adjacent "show preview" button. This allows you to preview the template as it would appear on that page if you had saved the edit.

The template sandbox Template:Test (in the list of sandboxes at Zelda Wiki:Sandbox) can be used to test your templates.

ed templates can also be tested on pages using Special:TemplateSandbox. Please refer to MediaWiki for more information on this feature.

Alternatively, since one can not only Templates but ordinary pages (e.g.   will display the entire bombchu article content), then for example you can create your own template sandbox on , and type   into a sandbox to use it.

In addition, after making a template, you can view it or troubleshoot issues with Special:ExpandTemplates, which will expand all templates recursively, i.e. repeatedly substituting all templates (and templates in templates) until no  remain.