User blog:King Dragonhoff/Editing/Templates

Templates are pages in the Template Namespace that are transcluded into multiple content pages. When a template is transcluded, the template page is copied onto the page. Templates can also be used to process inputs and display different results using parameters.

Template Mark-ups
The basic template Wikitext mark-up is the template's name surrounded by two curly brackets. Example:

Templates can also have parameters which are inputs that are processed by the template to change how it displays. If a template has parameters, they will be listed on the template's documentation on its page. Parameters are separated from the template name and each other by pipes [|]. The parameter name/number (if applicable) is separated from the actual input by an equal sign [=]. Parameters can be named or unnamed.

Examples :

This template a named parameter called "Name":

This template has two named parameters called "Scale" and "Link":

This template has an unnamed parameter:

This template has two unnamed parameters:

Parameters do not need to be listed inline. This markup...

...is equivalent to this markup:

Important Templates
Below are lists of templates that we use frequently here. If you want to learn more about what a specific template does, visit that template's page by clicking the link. There, you will find the template's documentation.

Vital Templates
These templates are very important for the design of articles or the workings of other templates and tools but also likely to need updating from time to time. Lookup templates are used to ensure that when an important mechanic of the game is changed, only the Lookup template needs to be updated rather than every template or tool that uses that mechanic.
 * Template:Card - used to post and regulate card images
 * Template:Icon - used to post and regulate icon images
 * Template:LookupCardRarity - used to find the rarity of card
 * Template:LookupCardMaxLevel - used to find the max level of a rarity

Article Management
These templates are posted at the top of a page to classify it. Each one creates a large banner and places the affected page into a category.
 * See Article management templates

Images and Design
These templates are used to make pages look their best.
 * Template:Quote - used to display a quote from the game
 * Template:Statistics - used to display the header at the top of the Statistics section on card pages
 * Template:Rarity - used to display and color the name of a rarity level of cards
 * Template:HiddenSeries - used to create a button that displays text that is initially hidden
 * Template:MiniDeck - used to display a small battle deck
 * Template:NavButton - used to create buttons that serve as links to pages. This template is for the home page.
 * Template:CoCLink - used to create a button that takes users to an equivalent page on the Clash of Clans Wikia

Fun
These templates are used mostly on User pages for fun.
 * Template:MyBattleDeck - displays a battle deck
 * Template:Player - displays the levels of your in-game units
 * Template:USERNAME - displays the username of the user viewing the page
 * Template:Countdown - used to create a countdown timer
 * Template:Emote - used to display the taunts/emotes from battles as small images

Other

 * Template:Protection - places a stoplight at the top of the page that shows that page's protection level
 * Template:MagicWords - inserts the NOTOC and NOEDITSECTION magic words into pages
 * Template:Fact - used to mark a statistic or statement as unconfirmed
 * Template:Documentation - used on template pages (inside noinclude tags) to display information about how to use that template