The first step when it comes to the creation of something is to plan. Some things require little planning while some requires a huge plan, the more complex your template is, the more time you'll need to plan and train.

Make sure to stop to think before starting any template. There are some points:

  • Can you do it? This point may sound obvious but thinking if you can do something is very important, if you are doing it yourself.
  • Does the wiki need it? Another point that may sound obvious but is forgotten by many.
  • Can it be done using an existent template? If the answer to this is Yes, then think if which one would be more time consuming. If a Template is less time consuming, be sure that it needs to be reused, as there is no use for a Template that can be used only a few times.
  • How would it look and how would it work? This is the hardest one to some people, like me, as it's where the planning really begins. Have a mental, digital or physical image of how it would look like; try to think how it would work, put your logic to work and have a plan before the coding starts.


This is the part where the design turns real. Take your image and make your template look like it. If you are getting used to how to edit wikicode you can start planning your templates using the Visual Editor and checking the Source Editor to learn the basics and, if you want, look at a CSS tutorial, as this is beyond the scope of this post.

A way to look at the appearance of your template is to use the "Preview" button when edit, however some things don't work there, as Switches or collapsible tables. Another good way is to have a "Sandbox". If you don't have one, you can click here and create it. It's a personal page so as long as it doesn't break the wiki's rules on profiles, you can add whatever you want there. Just edit, publish and move the next step, where the fun part begins.

Coding the template

When you write a template, you need to have a text or image that changes when the user uses it.

Here I'll show two of the most used commands on templates:

Code How it works Example(Code) Example Result

This is one of the simplest commands.

It gets a parameter and shows it.

Note: The number means the number the "|" it responds to. {{{1}}} means the first |, {{{2}}} means the second | and so on.

Template code: (Template:ExAmp):

The user inserted: {{{1}}}

On a page:

|Some random text WASD
The user inserted: Some random text WASD
{{{1|Default text}}}

This is the same command as before, just set up to display a something in case no input is given by the user.

It gets a parameter and shows it, it shows a pre-configured value in case no parameter is given.

Template code: (Template:ExAmp):

The user inserted: {{{1|nothing}}} and {{{2|nothing}}}

On a page:

|Another random typing KMFK
The user inserted: Another random typing KMFK
{{{command}}} or {{{command|Default Text}}}

Almost the same command as before, but works different.

It gets a named parameter and shows it, it can show, if set up to, a pre-configured value in case no parameter is given.

Template code: (Template:ExAmp):

The user inserted: {{{first_text}}} for {{{second_text|now}}}

On a page:

|first_text = This ends it
The user inserted: This ends it for now


This is my first article directly talking about coding, so it may look (or be) confusing. Feel free to ask anything at the comments or to request another article talking about something specific about Template creation.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.