Using A Template

From AEWiki

Jump to: navigation, search

Templates are very important tools in a wiki. They allow for easy editing and contribution. If you are not someone who is very familiar with something like CSS or other web development languages, they are incredibly useful. Not to mention they keep a uniform look across all pages of the same type. With this guide I'm going to show you how to use a template in a wiki page.


First, you must find the Template you want to use. The easiest way to do this is to find another page of a similar type and find out which one it uses. In this example, I'm going to add a new piece of armor... so if you go to a pre-existing page that shows a piece of armor, you can catch a glimpse of what you'll want to use. So if you visit say the Superior Gladiator Armor page, you'll see a nifty little information page on the left that looks like this:

Image:Template_example.PNG

The wiki code to generate that very useful information page looks like this:


{{Template:Armor|
image=[[Image:Superior_gladiator_armor_shot.PNG]]|
name=Superior Gladiator Armor |
part=Chest|
req=Str 16+ <br />Lvl 16+|
prot=??|
res=none|
stat=none|
weight=6|
val=25,117|
dur=500|
expansion=AE
}}


It's a bit intimidating if you look at it as a whole, but take it in bit by bit and you'll see it's not so bad.


The first line: "{{Template:Armor|" simply tells the wiki to use the Armor Template.


All of the following lines (except the closing }} are assigning values to variables. If I lost you with that, don't worry, I'll explain. A variable stores a piece of information to be used later. Its use is best explained with an example.


Take the third line: "name=Superior Gladiator Armor |". All we're doing is saying the name of this armor is "Superior Gladiator Armor". The other lines... like dur=500 are saying the Base Durability of this item is 500. After you've filled in all of the variables, the wiki looks up the armor template, takes all the information you filled in, and spits out a pretty little organized box.


All you have to do is save the page and the information is organized by the wiki for you!

Personal tools