No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
:''Parent Page: [[Battlestar Wiki:Template List]]'' | :''Parent Page: [[Battlestar Wiki:Template List]]'' | ||
== What are Templates? == | |||
Templates are pages that are created with two '''{''' on either side of the template name. {{tl|interview}} is a perfect example of how a template is created. They are used to process and show a message over a number of pages without having to retype the information over again and allows quick updating. All you would have to do is update the template and all the pages contacting with that template. | |||
== Template Syntax == | |||
When you create most templates you can just have them posted. Some don't have any options. but others have tons of options (i.e. {{tl|cite web}}). But as soon as you get complicated templates with lots of options, it is best to keep the syntax simple and easy to understand if you ever had to do any templates. Some of them have options that are only needed on certain pages and some things on a template should only be on the template. This pages is to tell you haow to do that. | |||
A few things you know first is that there are a few template related syntax HTML tags that you should know before going any futures. | |||
* <nowiki><includeonly><includeonly></nowiki> | |||
** Any '''code/text''' in between these tags will only get displayed if the template itself is rendered. | |||
* <nowiki><noinclude><noinclude></nowiki> | |||
** Any '''code/text''' in between these tags will only be processed in the template page itself and never will be passed on when rendered. | |||
== <nowiki>{{qif}}</nowiki> v. [http://meta.wikimedia.org/wiki/ParserFunctions ParserFunctions] == | |||
The template <nowiki>{{qif}}</nowiki> is now gone. Using [http://meta.wikimedia.org/wiki/ParserFunctions ParserFunctions] is the only way to do comparisons. |
Revision as of 04:50, 6 August 2006
- Parent Page: Battlestar Wiki:Template List
What are Templates?
Templates are pages that are created with two { on either side of the template name. {{interview}} is a perfect example of how a template is created. They are used to process and show a message over a number of pages without having to retype the information over again and allows quick updating. All you would have to do is update the template and all the pages contacting with that template.
Template Syntax
When you create most templates you can just have them posted. Some don't have any options. but others have tons of options (i.e. {{cite web}}). But as soon as you get complicated templates with lots of options, it is best to keep the syntax simple and easy to understand if you ever had to do any templates. Some of them have options that are only needed on certain pages and some things on a template should only be on the template. This pages is to tell you haow to do that.
A few things you know first is that there are a few template related syntax HTML tags that you should know before going any futures.
- <includeonly><includeonly>
- Any code/text in between these tags will only get displayed if the template itself is rendered.
- <noinclude><noinclude>
- Any code/text in between these tags will only be processed in the template page itself and never will be passed on when rendered.
{{qif}} v. ParserFunctions
The template {{qif}} is now gone. Using ParserFunctions is the only way to do comparisons.