Template:MTP: Difference between revisions

From Pokemon Revolution Online Wiki
Jump to navigation Jump to search
Created page with "<noinclude>Use this in tandem with Template:MoveTableGeneric to construct the move-data rows in it. The only argument needed is the Pokemon's name; the rest of the Pokemo..."
 
The method that I devised for informatic optimization is test-approved; transposing it to here, as such. All move pages should load much more seamlessly and expend less extravagant amount of resources for tranclusions, now.
 
(17 intermediate revisions by the same user not shown)
Line 4: Line 4:
</noinclude>
</noinclude>
<includeonly>
<includeonly>
{{#get_web_data:url=http://pro-wiki.info/index.php?title=Special:GetData/PokemonRawList|format=CSV with header|filters=Name={{{Name}}}|data=number=Pokedex Number,name=Name,type1=Type1,type2=Type2}}
<tr style="background-color:#FFFFFF;">
<tr style="background-color:#FFFFFF;">
<td>{{#external_value:number}}</td>
{{#vardefine:iteration|{{#arraysearch:name|{{ucfirst:{{{Name}}}}}}}}}
<td>[[File:{{#external_value:number}}Icon.png]]</td>
<td>{{padleft:{{#arrayindex:number|{{#var:iteration}}}}|3}}</td>
<td><span style="{{#ifeq: {{#external_value:category}} | Status | | {{#ifeq:{{#external_value:typeless}} | N | {{#ifeq:{{#external_value:type1}} | {{#external_value:movetype}} | font-weight: bold; | {{#ifeq: {{#external_value:type2}} | {{#external_value:movetype}} | font-weight: bold;}} }} }} }}">[[{{#external_value:name}}]]</span></td>
<td>[[File:{{#arrayindex:number|{{#var:iteration}}}}Icon.png]]</td>
<td style="background-color: #{{{{#external_value:type1}}_color}}; border: 2px solid #{{{{#external_value:type1}}_color_dark}};">[[{{#external_value:type1}}_(type)|<span style="color:#FFFFFF;">{{#external_value:type1}}</span>]]</td>
<td><span style="{{#ifeq: {{#var:stab}} | 1 | {{#ifeq:{{#arrayindex:type1|{{#var:iteration}}}} | {{#external_value:movetype}} | font-weight: bold; | {{#ifeq: {{#arrayindex:type2|{{#var:iteration}}}} | {{#external_value:movetype}} | font-weight: bold;}} }} }}">[[{{{Name}}}]]</span></td>
<td style="background-color: #{{{{#external_value:type2}}_color}}; border: 2px solid #{{{{#external_value:type2}}_color_dark}};">[[{{#external_value:type2}}_(type)|<span style="color:#FFFFFF;">{{#external_value:type2}}</span>]]</td>
<td style="background-color: #{{{{#arrayindex:type1|{{#var:iteration}}}}_color}}; border: 2px solid #{{{{#arrayindex:type1|{{#var:iteration}}}}_color_dark}};">[[{{#arrayindex:type1|{{#var:iteration}}}}_(type)|<span style="color:#FFFFFF;">{{#arrayindex:type1|{{#var:iteration}}}}</span>]]</td>
<td style="background-color: #{{{{#arrayindex:type2|{{#var:iteration}}}}_color}}; border: 2px solid #{{{{#arrayindex:type2|{{#var:iteration}}}}_color_dark}};">[[{{#arrayindex:type2|{{#var:iteration}}}}_(type)|<span style="color:#FFFFFF;">{{#arrayindex:type2|{{#var:iteration}}}}</span>]]</td>
</tr>
</tr>
</includeonly>
</includeonly>

Latest revision as of 03:11, 1 September 2017

Use this in tandem with Template:MoveTableGeneric to construct the move-data rows in it.

The only argument needed is the Pokemon's name; the rest of the Pokemon-relevant data will be gleaned from PokemonRawList.