Sarna News: BattleTechGear.com

Template talk:InfoBoxJumpShip

  • Thanks for the cleanup, Nic. Gonna get into the code and see how you made it simpler. Now, statements like {{{Introduced|}}} don't refer to a template somewhere else, right? This is the only template needed for this infobox?--Revanche 00:30, 10 October 2006 (CDT)

Correct. There's two things to remember about the templates. Two curlies {{ T }} in page A calls a template 'T', while three curlies in 'T' (such as the code {{{ Z }}}) refers to a parameter named Z that was passed from A to T.

Example 1

Lets say in page A, you want to call template T:

A code:

{{ T | Param1=1 | Param2=2 }}

Template:T code:

First parameter = {{{Param1}}}, second = {{{Param2}}}

End Result/Output of A:

First parameter = 1, second = 2

Example 2

The text after a pipe | operator after a parameter in a template designates its default value. Thus, if this was T:

A code:

{{ T | Param1=1}}

Template:T code:

First parameter = {{{Param1}}}, second = {{{MissingParam2|default}}}

End Result/Output of A:

First parameter = 1, second = default

Nicjansma 01:19, 10 October 2006 (CDT)