User:The Crusader of Truth/Templates

Inspired from Atvelonis' Editing tutorial

Templates are the backbones of every page on the wiki. They are everywhere, ranging from infoboxes, to appearances, to simple things like appearances and categories. However, despite being a major part of Wiki, many users do not understand how templates work. My goal in this guide is to try to cover as many of the basics as possible, while giving in-depth information about the usage of each template. It is also noteworthy to know that I am not the best with templates – this guide may easily contain mistakes, and should not be considered as anything official.

Color code: White = Regular text Blue = Tags Green = Categories Red = Other

Infoboxes
Infoboxes are probably the most important part of any page. They display information that would normally not go in an article lead, such as gender for characters. Please note that this tutorial is going to cover Portable Infoboxes, or PIs, and not Tabled Infoboxes.

Basics
Every infobox needs basic variables such as theming, name, and image, which are all critical for an infobox to work. Without them, you would not have an infobox. Tags are used to format infoboxes. Below is a list of common tags used in infobox creation and what they do. Make sure that all tags are properly closed when creating an infobox. {{clr}}{{documentation}} Important components to note are the {{/Red| {{#if:}} }} command as well as the documentation below. Template documentation is useful to instruct users on how to use your template. (See {{Tl|Documentation}} for further details, below for infobox documentation) Documentation should always cover every variable in the template.
 * – Begins the infobox. Without this, nothing else will work. Theme is applied on this tag.
 * – Where infoboxes get the name they have at the top of pages. is the full tag.
 * is used inside of the title tag. This allows the name variable to not have to be used, unless a pagename has parenthesis inside of them.
 * – Where images that are in the infobox will go. See the example below for the text without images and it's categories.
 * is placed inside of the image tag to allow for image captions, if needed.
 * {{Blue|

Variables that are created by the template will be created from the name of the data source tags, such as "RefID" and "Faction." To rename them, simply change the tag as well as the corresponding label tag.

Documentation
Documentation pages for infoboxes should always have a ==Usage== header. Below the header, include all of the possible variables. Below this is an example of what the documentation page would look like for the template above. Note that on usage these will me mentioned in a  tag. Afterwards, a table would be included to cover the variables. The table is optional, however, very useful. To get a copy of it, check the source of this page.

Next topics
Things I need to cover
 * Appearance Templates
 * Createarticle templates
 * Image Licencing
 * Navboxes
 * Cover semi advanced stuff like how to use if etc, maybe not include