User:Pandamonia/Templates: Difference between revisions
From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
Pandamonia (talk | contribs) (→ptype2) |
Pandamonia (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
{{main|User:Pandamonia/Template:ptype1}} | {{main|User:Pandamonia/Template:ptype1}} | ||
<span style="color: red"><nowiki>{{User:Pandamonia/Template:ptype1|</nowiki></span><span style="color: blue"><nowiki>{{{1}}}</nowiki></span><span style="color: red"><nowiki>}}</nowiki></span> | <span style="color: red"><nowiki>{{User:Pandamonia/Template:ptype1|</nowiki></span><span style="color: blue"><nowiki>{{{1}}}</nowiki></span><span style="color: red"><nowiki>}}</nowiki></span> | ||
where '<span style="color: blue">{{{1}}}</span>' is the Pokémon's number in the [[National Pokédex]. | where '<span style="color: blue">{{{1}}}</span>' is the Pokémon's number in the [[National Pokédex]]. | ||
This template returns the first type of the Pokémon included. The type is returned lowercase. | This template returns the first type of the Pokémon included. The type is returned lowercase. | ||
= ptype2 = | = ptype2 = | ||
{{main|User:Pandamonia/Template:ptype2}} | {{main|User:Pandamonia/Template:ptype2}} | ||
<span style="color: red"><nowiki>{{User:Pandamonia/Template:ptype2|{{{1}}}}}</nowiki></span> | <span style="color: red"><nowiki>{{User:Pandamonia/Template:ptype2|</nowiki></span><span style="color: blue"><nowiki>{{{1}}}</nowiki></span><span style="color: red"><nowiki>}}</nowiki></span> | ||
where '{{{1}}}' is the Pokémon's number in the [[National Pokédex]. | where '<span style="color: blue">{{{1}}}</span>' is the Pokémon's number in the [[National Pokédex]]. | ||
This template returns the second type of the Pokémon included, if any. The type is returned lowercase. If there is no second type for that Pokémon, like {{p|Chikorita}} who is only a {{typecolor2|Grass}} Pokémon, the template will return "none." To work around displaying this null result this, read about the [http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23switch: #switch] parser function at WikiMedia. | This template returns the second type of the Pokémon included, if any. The type is returned lowercase. If there is no second type for that Pokémon, like {{p|Chikorita}} who is only a {{typecolor2|Grass}} Pokémon, the template will return "none." To work around displaying having a Pokémon (let's use {{p|Chikorita}} again) displayed as {{2t|{{User:Pandamonia/Template:ptype1|152}}|{{User:Pandamonia/Template:ptype2|152}}}} this null result this, read about the [http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23switch: #switch] parser function at WikiMedia. | ||
= trainercard = | = trainercard = | ||
In the [[Fuego Ironworks|works]]… | In the [[Fuego Ironworks|works]]… |
Revision as of 18:27, 23 April 2009
ptype1
- Main article: User:Pandamonia/Template:ptype1
{{User:Pandamonia/Template:ptype1|{{{1}}}}} where '{{{1}}}' is the Pokémon's number in the National Pokédex.
This template returns the first type of the Pokémon included. The type is returned lowercase.
ptype2
- Main article: User:Pandamonia/Template:ptype2
{{User:Pandamonia/Template:ptype2|{{{1}}}}} where '{{{1}}}' is the Pokémon's number in the National Pokédex.
This template returns the second type of the Pokémon included, if any. The type is returned lowercase. If there is no second type for that Pokémon, like Chikorita who is only a Grass-type Pokémon, the template will return "none." To work around displaying having a Pokémon (let's use Chikorita again) displayed as [[(type)|]]/[[(type)|]] this null result this, read about the #switch parser function at WikiMedia.
trainercard
In the works…