Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Battlestar Wiki:Template List Guidelines: Difference between revisions

From Battlestar Wiki, the free, open content Battlestar Galactica encyclopedia and episode guide
Shane (talk | contribs)
No edit summary
Shane (talk | contribs)
Line 17: Line 17:
== <nowiki>{{qif}}</nowiki> v. [http://meta.wikimedia.org/wiki/ParserFunctions ParserFunctions] ==
== <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.
The template <nowiki>{{qif}}</nowiki> is now gone. Using [http://meta.wikimedia.org/wiki/ParserFunctions ParserFunctions] is the only way to do comparisons. [[:Category:Mathematical templates|Mathematical templates]] have been imported from ''Wikipedia'' to help with complex math operations in template.
 
== Live Example ==
The best example on this Wiki is the {{tl|cite web}} template as it's very complex. If you view the template why you read it would be good so you can compare on what stuff does.
 
=== Part 1 ===
Has the actual template code. It is all increased with <nowiki><includeonly></nowiki> because there are required options for the template and if it was formated, it would return an error and we don't need to show that to a user who is trying to see how to use a template.
 
=== Part 2 ===
 
=== Part 3 ===
 
=== Part 4

Revision as of 05:14, 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. Mathematical templates have been imported from Wikipedia to help with complex math operations in template.

Live Example

The best example on this Wiki is the {{cite web}} template as it's very complex. If you view the template why you read it would be good so you can compare on what stuff does.

Part 1

Has the actual template code. It is all increased with <includeonly> because there are required options for the template and if it was formated, it would return an error and we don't need to show that to a user who is trying to see how to use a template.

Part 2

Part 3

=== Part 4