Template:Case: Difference between revisions

From Pixar Cars Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#forargs: cardback
<includeonly><!--{{#forargs: cardback
  | n
  | number
  | value
  | value
  | {{#vardefine:cardback{{#var:n}}|{{{cardback{{#var:cardback{{#var:n}}}}|}}}}}
  | {{#vardefine:cardback{{#var:number}}|{{#var:value}}}}}}-->
}}{{#vardefine:12adjust|{{#ifeq:{{{asst|}}}|HHV86|DXV29|{{{asst|}}}}}}}{{#ifeq:{{{asst|}}}|HHV86|{{#vardefine:12count|DXV29}}|}}<!--
{{#vardefine:12adjust|{{#ifeq:{{{asst|}}}|HHV86|DXV29|{{{asst|}}}}}}}{{#ifeq:{{{asst|}}}|HHV86|{{#vardefine:12count|DXV29}}|}}<!--
// Auto-include the right declaration template for re-building
// Auto-include the right declaration template for re-building
-->{{Case/{{{asst|}}}}}</includeonly><noinclude><!--
-->{{Case/{{{asst|}}}}}</includeonly><noinclude>{{Vehicle templates}}<!--
// Cases table
// Cases table
-->{{#cargo_declare:_table=Cases
-->{{#cargo_declare:_table=Cases
Line 46: Line 46:
|Code={{{code|}}}{{{letter|}}}
|Code={{{code|}}}{{{letter|}}}
|ListID={{#var:number}}
|ListID={{#var:number}}
|Card_OR={{{cardback{{#var:number}}|}}}
}}}}
}}}}
<div style="max-width:720px; text-align:center; margin:10px auto">
<div style="max-width:720px; text-align:center; margin:10px auto">
Line 63: Line 64:
| DXV99 = Releases.Toy_number{{equals}}C_{{{asst|}}}.Namestring
| DXV99 = Releases.Toy_number{{equals}}C_{{{asst|}}}.Namestring
| Releases.Namestring{{equals}}C_{{#var:12adjust}}.Namestring}},Releases.Asst= C_{{#var:12adjust}}.Asst
| Releases.Namestring{{equals}}C_{{#var:12adjust}}.Namestring}},Releases.Asst= C_{{#var:12adjust}}.Asst
|fields=Carded_photo,Card_2,Model_name
|fields=Carded_photo,Card_2,Model_name,Card_OR
|where=Code like '{{{code|}}}{{{letter|}}}' {{#if:{{{year|}}}|AND Year like '%{{{year|}}}%'|}}
|where=Code like '{{{code|}}}{{{letter|}}}' {{#if:{{{year|}}}|AND Year like '%{{{year|}}}%'|}}
|order by=ListID
|order by=ListID
Line 180: Line 181:
}}</pre>
}}</pre>
|}
|}
===Changing image===
By default, the image displayed for a vehicle is the one set as {{param|card}} in their {{tem|vehicle row}}. Occasionally a vehicle will have {{param|card2}} set instead &ndash; their only issue was on the second "style" of their series' cardback designs, and need to be placed in their respective [[Help:Series|series page]] column.
: ''Example: The {{Mainline|2023}} had two cardback variations, where most releases had one or the other.
{| class="wikitable"
|-
! V1 || V2
|-
| [[File:2023 crusty.jpg|120px]]
|
|-
|
| [[File:Misti 2023.png|120px]]
|}
This isn't an issue, as if no {{param|card}} value exists, then the display will default to that of {{param|card2}}, and so on.
We're concerned where someone has ''both''. Per the above, style 1 is the value of {{param|card}}, and will always be chosen instead of the second one, even if we don't want it to be!
{|class="wikitable"
|-
| [[File:Lightning mcqueen with racing wheels cars 2022 single.jpg|120px]]
| [[File:Lightning McQueen with Racing Wheels nowhite 2024 2023.png|120px]]
|}
Luckily we can '''override it''' by setting the {{param|cardbackX}} parameter, where {{code|X}} correlates to the entry number ({{param|car5}} needs {{param|cardback5}}, etc.) The input value then should be <code>V''n''</code>, where ''n'' equals the column number of the image you want. If you don't know which one, you could check the series page.
{{param|car15}} {{code|V2}}
[[Category:Mattel templates]]
[[Category:Mattel templates]]
</noinclude>
</noinclude>

Latest revision as of 17:28, 19 September 2024

Diecast Project documentation
Help pages
Vehicles · Releases · Series
Templates
Core Utility
infobox · table · row · list · case poster sort · paired row · colno amend · series nav
This template defines the Cargo table "Cases".

View table.

Usage

This template is used to display the contents of a Mattel Disney Pixar Cars case assortment. In addition to some basic identification parameters, it takes a numbered list of every car in the case. Each item is then matched to its corresponding database entry, from which it retrieves the links and photo.

Intro

First, you must fill out information about the case itself:

  • |asst=, |code=, and |letter= - These correspond to the large nine-digit number on the box. Example:
DXV29 - 958 A
asst code letter

You'll also generally need to specify the |year=, ex. 2024

List of vehicles

Writing out the contents list is straightforward; list out the names in the format |carX=name (X = line number, i.e. car1, car2). Make sure repeats each have their own line (i.e. a case of 24 cars should *always* have 24 numbered lines)

Reasons a vehicle is not showing:

  1. It is not in the database at all: info for that release is missing from their vehicle page. Once you add it there, the case list automatically updates.
  2. It is in the database, but the pairing has failed. The most likely reasons for this are:
    • You will need to make sure the listed name matches what the sort name for the corresponding release is on its home vehicle page. By default, a release's sort name is equivalent to its home page name - if |sort_name= is placed in the {{vehicle infobox}}, that value then becomes the default for all – an individually assigned sort_name inside the {{vehicle row}} overrides both.
    • Their Assortment column is empty. Except for some multipacks, the assortment code is automatically retrieved depending on the Series (and recursively '''Year'''/'''Sub''') field inputs. This probably failed if the |format= parameter is either missing or incorrectly set. For most mainline series, the Single and 2-pack values return their respective assortments – however, Deluxe single releases must have |asst= set to Deluxe in source mode.
|count= Determines number of cars, 6 per row: 12 by default; 18 for three rows, 24 for four
|car1=
|car2=
 etc.
Put name of car, up to 24
|image1=
|image2=
 etc.
Image corresponding to car number
{{Mattel case assortment
|count = 12
|car1=   |image1=
|car2=   |image2=
|car3=   |image3=
|car4=   |image4=
|car5=   |image5=
|car6=   |image6=
|car7=   |image7=
|car8=   |image8=
|car9 =  |image9=
|car10=  |image10=
|car11=  |image11=
|car12=  |image12=
}}
{{Mattel case assortment
|count = 18
|car1=   |image1=
|car2=   |image2=
|car3=   |image3=
|car4=   |image4=
|car5=   |image5=
|car6=   |image6=
|car7=   |image7=
|car8=   |image8=
|car9 =  |image9=
|car10=  |image10=
|car11=  |image11=
|car12=  |image12=
|car13=  |image13=
|car14=  |image14=
|car15=  |image15=
|car16=  |image16=
|car17=  |image17=
|car18=  |image18=
}}
{{Mattel case assortment
|count = 24
|car1=   |image1=
|car2=   |image2=
|car3=   |image3=
|car4=   |image4=
|car5=   |image5=
|car6=   |image6=
|car7=   |image7=
|car8=   |image8=
|car9 =  |image9=
|car10=  |image10=
|car11=  |image11=
|car12=  |image12=
|car13=  |image13=
|car14=  |image14=
|car15=  |image15=
|car16=  |image16=
|car17=  |image17=
|car18=  |image18=
|car19=  |image19=
|car20=  |image20=
|car21=  |image21=
|car22=  |image22=
|car23=  |image23=
|car24=  |image24=
}}

Changing image

By default, the image displayed for a vehicle is the one set as |card= in their {{vehicle row}}. Occasionally a vehicle will have |card2= set instead – their only issue was on the second "style" of their series' cardback designs, and need to be placed in their respective series page column.

Example: The 2023 Mainline had two cardback variations, where most releases had one or the other.
V1 V2

This isn't an issue, as if no |card= value exists, then the display will default to that of |card2=, and so on.

We're concerned where someone has both. Per the above, style 1 is the value of |card=, and will always be chosen instead of the second one, even if we don't want it to be!

Luckily we can override it by setting the |cardbackX= parameter, where X correlates to the entry number (|car5= needs |cardback5=, etc.) The input value then should be Vn, where n equals the column number of the image you want. If you don't know which one, you could check the series page.

|car15= V2