Help:Templates: Difference between revisions

From StrategyWiki, the video game walkthrough and strategy guide wiki
250 bytes added ,  15 September 2009
→‎{{#switch:}}: additional, parameter example
m (footer nav links)
(→‎{{#switch:}}: additional, parameter example)
Line 340: Line 340:
|<pre>{{#switch:hello|HELLO=foo = 1|hello|hi|Hello=bar = 2|#default=baz = 3}}</pre>
|<pre>{{#switch:hello|HELLO=foo = 1|hello|hi|Hello=bar = 2|#default=baz = 3}}</pre>
|{{#switch:hello|HELLO=foo = 1|hello|hi|Hello=bar = 2|#default=baz = 3}}
|{{#switch:hello|HELLO=foo = 1|hello|hi|Hello=bar = 2|#default=baz = 3}}
|-
|<pre>{{#switch:{{{parametername}}}|<value1>=Whatever|<value2>=Something|Nothing}}</pre>
|When used in a template, depending on what you pass to "{{{parametername}}}", it could be either "Whatever", "Something", or "Nothing" if nothing is passed.
|}
|}


{{Footer Nav|game=StrategyWiki:Guide|prevpage=Advanced tables|nextpage=Walkthrough}}
{{Footer Nav|game=StrategyWiki:Guide|prevpage=Advanced tables|nextpage=Walkthrough}}