Actions

User

User:Symon/blog/The Power of Templates

From EastKingdomWiki

< User:Symon‎ | blog
Revision as of 12:08, 25 September 2019 by Symon (talk | contribs)

The Power of Templates

One of the most powerful, and most used features of the wiki are Templates. Using something called 'transclusion', Templates can be quickly and easily added to a page. Templates are everywhere in the wiki. There are at current count, over 200 templates in the wiki. Let's take a quick look at a template that pretty much anyone in the wiki is already using, the populace template.

When you first edit your populace page, you'll see the following:

{{Populace
|photo = [[File:Photo needed.jpg|200px]]
|photocaption = Caption Needed
|location = 
|status = 
|opid = 
|device = [[File:Device needed.jpg|200px]] 
|devicecaption = Heraldry Needed 
|awards = 
|offices = 
}}
 

This is a request to include the {{Populace}} template. It goes a step further than just copying the template, and lets you add your specific information to the results. Adding a link to your photo or device, or entering your OPID number will automatically put that into the corresponding part of the template as it gets included into your page.

And those sections for awards and offices? Those are all templates as well! If you add {{OSW}} to the awards line, it will automatically add the Order of the Silver Wheel template, which adds the image to your populace template, and links it to the Order of the Silver Wheel page, like so:

Companion of the Order of the Silver Wheel

All of the Templates for Awards and Offices can be found at the following links:

(Further information about editing your populace page and the sorts of things you can include can be found at Template_talk:Populace)

Now that you know what a template is, you'll start to see that they are used to provide a lot of the structure found in the wiki. The sidebars found on populace pages, territory pages, household pages, event pages, award pages, and so on.... all templates. The footers found at the bottom of Kingdom office pages, reign pages, timeline pages.... all templates. And of course, all the kingdom and baronial awards and offices. Even that box at the top that says the page is a Stub, and won't you please help out by adding more to the page? That box is a template.

Now that you know what a template is, and how to use one, take a look at Help:Templates For a guide to the most popular templates, and how they make the shape of the EK Wiki what it is. Got an award not listed? Copy an existing award template and make a new one for your award. Have some ideas on how to make the templates better or more useful? Let us know.