Now for the ever daunting template… Before you begin this little tutorial you should make sure you have a good grasp on categories as this relies heavily on that foundation. Moving on, I will explain what a template actually is.

In it's most basic form a template is used to setup some sort of basic formatting or structure that all pages within that category are to use. This means when you create a template you create it inside of a specific category, and it works for all pages within that category by default. Templates can be farther extended by CSS in a way that can completely change the look and feel of any pages within a category to look like a separate site all together. This is however not something we will be using as far as I know and a bit out of scope for this tutorial.

Creating a template is simple enough, it's basically like creating a normal page. Go to the category you would like to create a template for, in this example we'll use the 'test' category. Then create a page in that category named _template. In this case we would create a page named, 'test:_template'. Not the category then the template, just like a normal page.

Here is an example of a template for you to look at.

Whoa!? What the hell is with all of the content tags right? Templates allow us to separate content in just about any way we want to. Which means we have to have a way to separate the content, and thus the content tags. When you are creating the template page everything you do on that page will show up on every page within the category. So if you write, "Kain is a bastard" at the top of the template in normal text, all pages will have that at the top in normal text. So when you're creating the templat just go through and add whatever you want wherever you want and place those content tags wherever you want specific things to a page to show up.

Before I show you a page using this template I would like to point out that I have swapped content sections 3 and 4 with each other. That is to say content section 4 currently comes before content section 3. With that, check out this page and see a template working. This page holds all formatting and text that the template did with some page specific additions. You can click edit on this page to see exactly what's going on.

While editing a page that uses a template for separating content you will need to use the syntax '====' on a blank line without spaces before or after it as a separator. In other words…

This is content area 1
This is content area 2
4, and so on..

Do keep in mind that in our example we made content are 4 appear before content area 3. This works while you are viewing the page but when you go to edit the page you MUST put content in numbered order with the separation tags. For instance in the above code content 3 is placed above content 4. However if we used this code on a page using the test template content 4 will still appear above 3 while being displayed.

Lastly, if there is ever a page within a category that you do not want to be affected by the template, simply add an underscore '_' to the beginning of that pages name.

Other Tags

Wikidot has more than just content tags for making templates nicer. If you noticed in the template we have the %%author%% and %%date%% tags. You can see what these tags do on the test page and just like content tags you can place them anywhere in your template. For a listing of other tags see the wikidot official documentation on templates or click here!

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License