Help:Tutorials/Templates 101

From Ballotpedia
Jump to: navigation, search
Take me to the tutorials library
How to find and use a template:


Example:
How templates are used on a wiki:

Templates make it easy to standardize the way some information on the wiki is presented. An example is the “User Help” information box you see to the right.

This box is found on many pages in the wiki and the code that makes this box is quite complicated.

By creating a template on its own separate named page, (which becomes the name of the template) this page (User Help) can be automatically inserted on any other page.


Red down arrow.JPG


How to install a template:

To insert a template into a page, type the name of the template in the edit box, and surround it with double “curly brackets.” These are sometimes known as braces.

For example, the Help box here is the result of a very short template name code :

This is the form:

{{name of template here}}.

This is an example using the template's name: {{help}}




Red down arrow.JPG



How to view the template’s complicated code:

On the template’s page, “Template:Help” , you will find this code. This is the code that creates the User Help box.


However, since it is a template, to get the User Help box, you can simply insert the title “help”, enclosed in double curly brackets in any page’s edit box. It will look like this in the edit box: {{help}}

IMPORTANT NOTE: If the template page is changed, the changes will show up automatically on any other page that contains the template. So it is best not to change a template unless you are the template creator.


Help info box.jpg


Help template code.jpg
Help template page code.jpg
Personal tools
Namespaces
Variants
Actions
Encyclopedia
Calendar
Get Involved
Donate
Toolbox