FANDOM


Hello! It's been a bit of time since I made the last blog, so I might be a bit rusty with how I formatted the thing. Anyway, the question at hand today is "How does one make a template?" Well, I hope I can do a bit of justice and at least start you out on the right path.

Step 1

So, where to start? Well, to start at the very very very very very very you get it basics, you first need to name your template. This is a little more important then it may seem -- Without the proper name, your template won't even work properly. This is likely so basic some of you guys won't even need this step, but anyway:

The main goal of making any template page is to include Template: at the start of the title. Without this, you can't use your template anywhere, since it would likely just be registered as a plain page. If you're new to making templates (as you likely are if you're reading this,) you would want to check to see how you can make a template without adding anything crazy to the feed. For that, I would recommend using a sandbox as your template page.

Step 2

Making a template requires you to have something you want to template: Aka, what are you making a template? For example, if you're making a notice then you would first want to select "Notice" on the popup that comes at the start of making the page.

After you've done that, you would want to make your template itself. For that, you may want more expertise in making tables, and/or using HTML, other templates, etc. For my example, I will be using the incomplete template. The source and what the source produces will be below,

Template example source

<div class="banner" align="left" style="background: #222; border: 1px solid #555; color: #FFFFFF; padding:10px;{{CSSBorder|5px}};">
{|style=""
|-
|<div style="width: 545px;">Immediate expansion is imperative for this <span style="color:red;">'''incomplete'''</span> article! While it contains cursory information, large sections are left blank, lists are left unfinished, and tables are missing data entries. Resolve these and any issues in accordance with the [[TES:Style and Formatting|styling sheet]], then remove this template.</div>
|style="width:90px; font color:black; text-align:center;"|[[File:Incomplete.png|50px]]
|}</div>

Template example

Back to step 2

The first thing you may notice is that the text contains a lot of...gibberish. However, don't let that confuse you, as you will likely learn their meanings as time goes by. Remember, you don't have to follow my example and use the incomplete template.

Step 3

Ok, so now what? If you want to add an category to your template, the following is recommended to put directly below your template:

<includeonly>[[Category:(Insert Category Name here)]]</includeonly>

Step 4

Ok, so you have your template and your page? It's time to hit publish right? Not quite. Every template page needs the following: A documentation page, and at least one category (For the template itself.) To do this, you need to make use of the <noinclude> tag. In order to do this, you need to essentially add something like the following:

<noinclude>{{Documentation}}[[Category:(Template type, if nothing use "Templates." However, you should try to always make this have a specific template type.)|{{PAGENAME}}]]

Once you have a category for your template, you should be good to go.

And there you have it!

You should have one new operational template! To use your new template, just use {{<templatename>}}. Please try to keep all personal templates on your sandbox. If you did create a template on your sandbox, use the following: {{User:<insert your username>/<insertFULLtemplatename>}}.

Help!!

If you require any further assistance, just leave a message by my talkpage. As soon as I have a free moment, I'll be glad to help out.

And I guess that concludes this how to! Thanks for reading!