Template:Series index: Difference between revisions
RodRedlineM1 (talk | contribs) |
RodRedlineM1 (talk | contribs) |
||
Line 42: | Line 42: | ||
|Single = {{#vardefine:colno_sortkey|{{Numbersort|{{{colno|}}}}}}}{{#vardefine:colnumlist_number|{{{colno|}}}}}{{#switch:{{{asst|}}} | |Single = {{#vardefine:colno_sortkey|{{Numbersort|{{{colno|}}}}}}}{{#vardefine:colnumlist_number|{{{colno|}}}}}{{#switch:{{{asst|}}} | ||
| Deluxe | deluxe = V2843{{#vardefine:set|C2_D}} | | Deluxe | deluxe = V2843{{#vardefine:set|C2_D}} | ||
| V2796{{#switch:{{{chase|}}}|SC|Super Chase=|{{#vardefine:set|C2}}}} | | {{#ifeq:{{{version|}}}|International|W1938|V2796}}{{#switch:{{{chase|}}}|SC|Super Chase=|{{#vardefine:set|C2}}}} | ||
}} | }} | ||
|2-pack = V2832 | |2-pack = V2832 |
Latest revision as of 18:37, 21 September 2024
This is the definition list for each Mattel Disney Pixar Cars series, as referred inside the major templates ({{vehicle row}}) and {{vehicle list}}). It takes advantage of switch statement functionality to help improve performance speed: Rather than repeatedly putting the series
input through multiple different expressions, and evaluating each variable one at a time, the parser only needs to check the value once to retrieve all the pre-defined variables (and only them) all at the same time.
Some series have multiple "aliases" registered as failsafes, but for maintenance purposes (and general consistency), please only use one of the following calls (under construction):
|
|
|
Design
Returns the three variables necessary for displaying the "series" cell in each {{vehicle row}}: ID
, $name
, and $link
. Simplified visual:
<div id="$ID"> [[$link|$name]] </div>
Case-by-case it also returns pre-sets for asst
and exclusive
as well the colset
when each is needed.