PDA

View Full Version : Wikipedia Templates



Chris
30th December 2005, 10:24 AM
Alright, I've searched high and low and absolutely no one seems to give a straight forward, detailed answer.

I'm trying to figure out how I can get templates on my Wiki. The Wikipedia site only gives info on making templates on their own site. However, I can't seem to figure out how to make my own for my own Wiki. Plus the instructions for their own is quite vague. Apparently there's a directory on their site for templates, however mine doesn't have one.

If anyone happens to know, could you PLEASE explain to me as detailed as possible how in the hell I can install templates? :\

Eszett
30th December 2005, 1:41 PM
On a private wiki of which I am a sysop, you must create a template under the page Template:XYZ, where XYZ is the name you want to assign the template. After you create this page, you can add it into a page by typing {{XYZ}} within the code of said page. Mind you, this is just a basic template that will simply display something.

For example, if your template reads:
''This is a test template.''

...and the code of your page reads:
'''Tungsten''' is the seventy-fourth element of the periodic table.

{{XYZ}}

Your page will be displayed as:
Tungsten is the seventy-fourth element of the periodic table.

This is a test template.

If you want to create a template that can contain additional variables, add {{{ABC}}} within the code of the template where you want this item to appear. You can add several variables to your template as long as the part within the triple brackets is unique. Then, when putting this template into the code of your pages, type in {{XYZ|ABC=value}}, where value is the text you want displayed.

In this case, if your template reads:
The name of this article in German is '''{{{ABC}}}'''.

...and the code of your page reads:
'''Tungsten''' is the seventy-fourth element of the periodic table.
{{XYZ|ABC=Wolfram}}

Your page will be displayed as:
Tungsten is the seventy-fourth element of the periodic table.

The name of this article in German is Wolfram.

And I'm not sure, but I think support for templates comes as a part of the standard installation.

Chris
30th December 2005, 7:38 PM
That's just the thing. I can't create any kind of Template page, otherwise I get a 404 error. o_O Doesn't appear to be included with the standard installation.

Eszett
31st December 2005, 6:35 AM
Go to the Recent Changes on your wiki and check the drop-down list to see if it lists templates. If it does, the templates *should* be working.

Anyways, what version of MediaWiki are you using?

Chris
31st December 2005, 7:14 AM
The most recent one. I just upgraded last night.

Alright. I got it workin'. Thanks for the help. :x

Eszett
31st December 2005, 9:16 AM
No problem at all. :]