Difference between revisions of "Using templates"

From Spydiewiki
Jump to navigationJump to search
Line 49: Line 49:


[[Category:Help|Templates]]
[[Category:Help|Templates]]
[[Category:Templates|Using templates]]

Revision as of 04:10, 2 March 2008

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:

Test
Important note: This is a template for testing the usage of templates and their creation.

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

Related articles