Using templates
From Spydiewiki
Revision as of 01:48, 2 March 2008 by Rob (talk | contribs) (Templates moved to Using templates: Still problem with page title)
A template is a prewritten piece of code that let's you insert that code more easily if you need to use it often.
Standard messages can be created with templates but also lengthy formatting-parameters can be used in a more conveniant way.
Templtes for messages
Templates can be used by using the following syntax:
{{Example}}
In this case this is the result:
Templates for formatting
To use a template that does the formatting for you, simply place it where you usually would put the parameters that are substituted with the template. Here is an example with the template "Articletable", that does the formatting for tables in articles:
{|{{Articletable}} !Caption 1 !Caption 2 !Caption 3 |- |Content 1 |Content 2 |Content 3 |}
The result will look like this:
Caption 1 | Caption 2 | Caption 3 |
---|---|---|
Content 1 | Content 2 | Content 3 |