User blog:KuroUrufu/What templates do I really need on my wiki

As an admin, particularly as a founder, you want to make sure your wiki has good and useful templates. In this blog post, we are going to see some basics about templates - and it's absolutely worth it, we promise!



What are templates
Templates are useful tools to organize pages and their contents. They can perform the most disparate functions: format a text, navigate between different pages, show informative icons, illustrate data and information... They are essential for creating interesting pages that make you want to read them and above all to avoid always writing the same code: the name "template" in fact indicates that you can use the same (often very complicated) code in many pages without having to rewrite it every time; the result can always be the same or depend on the individual parameters that are entered.

How to find a template
You can find a complete list of templates on a wiki at Special:AllPages by selecting "Template" in the appropriate dropdown menu (to directly reach the list of templates, you can add   at the end of the wiki url).

Categories
Each template must be categorized. Category:Templates is the most generic category but it's best to organize templates into subcategories of this one: typical examples are Category:Infobox templates, Category:Design templates, Category:Notice templates, Category:Image license templates, etc. If the templates are well categorized, you can easily find them in these subcategories of Category:Templates. If not, you can find them at Special:UncategorizedTemplates and you should immediately consider categorizing them.

Types
Templates are organized into types. Every template needs a type: it indicates the kind of template and what it's used for (infobox, notice, note, navbox, quote, context-link, infoicon, scrolbox, image/video/gallery, data, design, navigation, non-article). There is also the "unknown" type: these templates should be given a type as soon as possible and are listed on Special:UnorganizedTemplates.

Infoboxes
Infoboxes are the most important templates in a wiki: there should be one in every content page! If you didn't already, we advise you to read this blog to know more about infoboxes.



The first thing you should do before using or creating an infobox is to visit the designated category (Category:Infobox templates or Category:Infoboxes - as we said, you should always be able to find the right category as a subcategory of Category:Templates). This way, you will check what infoboxes the wiki has: if you see one that describes the type of subject you are talking about in the page (a character, an object, a group, a place, an event, etc..), that's the right choice.

Now check its parameters (there should be an easy-to-read documentation in the template page where you can check them) and verify it contains all the fields you need: if it doesn't, add them! You can edit a template just like you would do with any other kind of page. So try to avoid creating a new infobox (and, in general, a template) that does the same as another one: for example, the pages about witches and heroes can all have the same "Character" infobox instead of having one for "Witches" and one for "Heroes" that have only a couple parameters as difference or even not at all. Likewise, try to avoid creating a new infobox to use on only a couple pages when you can easily adapt an existing one. Duplicate infoboxes create problems to you and the other editor of the wiki, present and future, so keep in mind that usually easy is best.



Furthermore, it's not a good idea to include too much templates in a bigger template: if it's too complex or too big, you might meet huge problems of functionality and usability, a little problem with a sub-template would cascade into major problems in the bigger template. This is especially true when dealing with infoboxes and navboxes.

In fact, you should also avoid copying complex templates from other wikis if you don't know how they work. It can be a good idea to take inspiration from other existing popular wikis but it's usually a bad idea to just copypaste them: those templates could be full of parameters useless to your purposes or working with complex CSS and other codes. You should first try to create the infobox you need if you feel improving an existing one is not enough. If you really feel you need to copy a template, and only if you really need it, you can copy it and maybe test it to verify it works: but try to copy just for the sake of copying, that's never a good idea.

In general, these guidelines apply to other templates too.

Most useful templates
Aside infoboxes, you'll want to have also other useful templates. Here are the most common.