Help:Templates: Difference between revisions

From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
(more coming soon)
 
(→‎Creating templates: ehh, my explanation is badly written)
Line 1: Line 1:
A '''template''' is a page, like its title says, a page which can be included into any other page, and sometimes be customized. This page gives tips on creating and using templates.
A '''template''' is a page, like its title says, a page which can be included into any other page, and sometimes be customized. This page gives tips on creating and using templates.
== Creating templates ==
== Creating templates ==
Templates in most cases, are ery easy to create. a page should have the prefix '''Template:''', but it doesn't need to be included to other pages.<br>
Templates in most cases, are very easy to create. a page should have the prefix '''Template:''', but it doesn't need to be included to other pages.<br>
This template below is an example. It can be included in the cirrent page by typing {{tl|example}} (where "example" is the template name, and the two parenthesis are used to include it:
This template below is an example. It can be included in the current page by typing {{tl|example}}"Example" is the name of the template, and the two curly braces are used to include it:
{{example}}
{{example}}
Sometimes, you may want to write about the template on its page (often to explain how and when to use it), but you don't want this text to appear on the template itself.  To do this, you should enclose such text with <nowiki><noinclude> and </noinclude></nowiki> so that it does not appear on every page you use the template on.  An example can be found in the {{tl|policy}} template.  Below the box is a line of text that does not appear on policy pages.
{{stub}}
{{stub}}

Revision as of 20:36, January 19, 2007

A template is a page, like its title says, a page which can be included into any other page, and sometimes be customized. This page gives tips on creating and using templates.

Creating templates

Templates in most cases, are very easy to create. a page should have the prefix Template:, but it doesn't need to be included to other pages.
This template below is an example. It can be included in the current page by typing {{example}}. "Example" is the name of the template, and the two curly braces are used to include it:

Correct
The template was successfully included in this page.

Sometimes, you may want to write about the template on its page (often to explain how and when to use it), but you don't want this text to appear on the template itself. To do this, you should enclose such text with <noinclude> and </noinclude> so that it does not appear on every page you use the template on. An example can be found in the {{policy}} template. Below the box is a line of text that does not appear on policy pages.

Stub.png