Help:Template

From Fanon Wiki
Revision as of 16:48, 13 May 2022 by PinkYoshiFan (talk | contribs)
Construction.png
This page is under construction.
Reason: #if, using other pages as templates, default param values
Logo mono black.png
This is one of Fanon Wiki's help pages and is meant to aid users by improving their ability to positively contribute to the wiki. Expanding pages such as this with additional information is always welcome.
Logo mono black.png

Templates are special types of pages that can be put into other pages with extra parameters to modify them.

Types of templates

Basic templates

The most basic of templates are templates with no parameters, such as {{Welcome}}, which you can add to pages simply by putting the template name inside two curly brackets ({ and }) much like a link.

Templates with parameters

Templates with parameters are templates that can be modified to suit the page they are on. Parameters can be either numbers or words. On the template code, they are represented by putting the parameter name in three curly brackets. To use numbered parameters, simply put a pipe (|) after the template name within the brackets, and repeat for each number. To use word parameters, put parameter name= after the pipe and before the parameter content (it is also possible, but not required, to do this with numbers). Most templates have a section at the bottom explaining the purpose of each parameter.

noinclude and includeonly

In order to avoid a mess of categorization and repeating template documentation every time they are called, noinclude and includeonly are used. <noinclude> should be put immediately after the part to be included in the page (transcluded) ends. Text that should not show up on the template itself, but should show up on the page it is included on (usually categories), wrap it in <includeonly> </includeonly>.