Template:Series index

From Disney•Pixar CARS Wiki
Jump to navigation Jump to search
This template is a component of another, as to help organize (and/or optimize) a larger structure of code. It is not meant to be called individually and should never be placed into an article.

This is the definition list for each Mattel Disney Pixar Cars series, as referred inside the major templates ({{vehicle row}}) and {{series 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.

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.