Template:Case: Difference between revisions

From Pixar Cars Wiki
Jump to navigation Jump to search
 
(58 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
<includeonly>{{#vardefine:12adjust|{{#ifeq:{{{asst|}}}|HHV86|DXV29|{{{asst|}}}}}}}{{#ifeq:{{{asst|}}}|HHV86|{{#vardefine:12count|DXV29}}|}}<!--
{|class="wikitable" style="text-align:center"
// Auto-include the right declaration template for re-building
{{!}}+{{{count|}}}-count
-->{{Case/{{{asst|}}}}}</includeonly><noinclude><!--
|width="16%"|[[File:{{{image1|}}}|120px]]
// Cases table
|width="16%"|[[File:{{{image2|}}}|120px]]
-->{{#cargo_declare:_table=Cases
|width="16%"|[[File:{{{image3|}}}|120px]]
|Assortment=Wikitext string
|width="16%"|[[File:{{{image4|}}}|120px]]
|Asst_Temp=Wikitext string
|width="16%"|[[File:{{{image5|}}}|120px]]
|Format=String
|width="16%"|[[File:{{{image6|}}}|120px]]
|Code=Wikitext string
{{!}}-
|Series=Wikitext string
|{{{car1|}}}
|SeriesF=Wikitext string
|{{{car2|}}}
|Letter=Wikitext string
|{{{car3|}}}
|LetterC=String
|{{{car4|}}}
|Year=Wikitext string
|{{{car5|}}}
|YearF=Wikitext string
|{{{car6|}}}
|Month=Wikitext string
{{!}}-
|Contents=Wikitext string
|width="16%"|[[File:{{{image7|}}}|120px]]
}}</noinclude><includeonly>{{#ifeq:{{{store|}}}|false||{{#cargo_store:_table=Cases
|width="16%"|[[File:{{{image8|}}}|120px]]
|Assortment={{{asst|}}}
|width="16%"|[[File:{{{image9|}}}|120px]]
|Code={{{code|}}}
|width="16%"|[[File:{{{image10|}}}|120px]]
|Letter=[[{{BASEPAGENAME}}#Case {{{letter|}}}{{!}}{{{letter|}}}]]
|width="16%"|[[File:{{{image11|}}}|120px]]
|LetterC={{{letter|}}}
|width="16%"|[[File:{{{image12|}}}|120px]]
|Format={{#switch:{{{type|}}}
{{!}}-
| single = Single
|{{{car7|}}}
| {{{type|}}}}}
|{{{car8|}}}
|Series={{#switch:{{{series|}}}
|{{{car9|}}}
| M | m | Mainline | mainline = Mainline
|{{{car10|}}}
|{{{series|}}}}}
|{{{car11|}}}
|SeriesF={{M-series/Cargo|series={{{series|}}}|1={{#switch: {{{series}}}
|{{{car12|}}}
  | Mainline | mainline | M | m = M
{{#ifeq:{{{count|18}}}|
  | {{{series}}}}}|2={{{year}}}|tooltip={{{card|}}}}}
{{!}}-
|Year={{{year|}}}
|width="16%"|[[File:{{{image13|}}}|120px]]
|YearF=[[List of vehicles by year/{{{year|}}}|{{{year|}}}]]
|width="16%"|[[File:{{{image14|}}}|120px]]
|Month={{{month|}}}
|width="16%"|[[File:{{{image15|}}}|120px]]
|Contents=<br/>{{{car1|}}}{{#if:{{{car2|}}}|<br/>{{{car2|}}}|}}{{#if:{{{car3|}}}|<br/>{{{car3|}}}|}}{{#if:{{{car4|}}}|<br/>{{{car4|}}}|}}{{#if:{{{car5|}}}|<br/>{{{car5|}}}|}}{{#if:{{{car6|}}}|<br/>{{{car6|}}}|}}{{#if:{{{car7|}}}|<br/>{{{car7|}}}|}}{{#if:{{{car8|}}}|<br/>{{{car8|}}}|}}{{#if:{{{car9|}}}|<br/>{{{car9|}}}|}}{{#if:{{{car10|}}}|<br/>{{{car10|}}}|}}{{#if:{{{car11|}}}|<br/>{{{car11|}}}|}}{{#if:{{{car12|}}}|<br/>{{{car12|}}}|}}{{#if:{{{car13|}}}|<br/>{{{car13|}}}|}}{{#if:{{{car14|}}}|<br/>{{{car14|}}}|}}{{#if:{{{car15|}}}|<br/>{{{car15|}}}|}}{{#if:{{{car16|}}}|<br/>{{{car16|}}}|}}{{#if:{{{car17|}}}|<br/>{{{car17|}}}|}}{{#if:{{{car18|}}}|<br/>{{{car18|}}}|}}{{#if:{{{car19|}}}|<br/>{{{car19|}}}|}}{{#if:{{{car20|}}}|<br/>{{{car20|}}}|}}{{#if:{{{car21|}}}|<br/>{{{car21|}}}|}}{{#if:{{{car22|}}}|<br/>{{{car22|}}}|}}{{#if:{{{car23|}}}|<br/>{{{car23|}}}|}}{{#if:{{{car24|}}}|<br/>{{{car24|}}}|}}<br/>
|width="16%"|[[File:{{{image16|}}}|120px]]
}}}}{{#forargs: car
|width="16%"|[[File:{{{image17|}}}|120px]]
| number
|width="16%"|[[File:{{{image18|}}}|120px]]
| value
{{!}}-
| {{#cargo_store:_table=C_{{{asst|}}}
|{{{car13|}}}
|Namestring={{#ifeq:{{{asst|}}}|DXV99|{{Product number|{{#var:value}}}}|{{#var:value}}}}
|{{{car14|}}}
|Asst={{{asst|}}}
|{{{car15|}}}
|Code={{{code|}}}{{{letter|}}}
|{{{car16|}}}
|ListID={{#var:number}}
|{{{car17|}}}
}}}}
|{{{car18|}}}
{{#IF:{{{code|}}}|'''{{{asst|}}}-{{{code|}}}{{{letter|}}}'''<br/>|}}{{#IF: {{{country|}}}|'''Made in:''' {{#SWITCH: {{{country|}}}
{{#ifeq:{{{count|24}}}|
  | CN | China = China
{{!}}-
  | TH | Thailand = Thailand
|width="16%"|[[File:{{{image19|}}}|120px]]
  | VN | Vietnam = Vietnam
|width="16%"|[[File:{{{image20|}}}|120px]]
  | China
|width="16%"[[File:|{{{image21|}}}|120px]]
|}}<br/>|}}'''Count:''' {{{count|}}}{{#IF: {{{date|}}}|<br/>'''Set date:''' {{{date|}}}|}}
|width="16%"|[[File:{{{image22|}}}|120px]]
{{#IF: {{{ref1|}}} | References:&nbsp;{{{ref1|}}}&nbsp;{{{ref2|}}}|}}
|width="16%"|[[File:{{{image23|}}}|120px]]
<div style="max-width:720px;display: flex;flex-direction: row;flex-wrap: wrap;text-align:center;margin:10px auto">
|width="16%"|[[File:{{{image24|}}}|120px]]
{{#cargo_query:tables=Releases,C_{{#var:12adjust}}
{{!}}-
|format = template
|{{{car19|}}}
|template = Case builder
|{{{car20|}}}
|named args=yes
|{{{car21|}}}
|join on={{#switch:{{{asst|}}}
|{{{car22|}}}
| DXV99 = Releases.Toy_number{{equals}}C_{{{asst|}}}.Namestring
|{{{car23|}}}
| Releases.Namestring{{equals}}C_{{#var:12adjust}}.Namestring}},Releases.Asst= C_{{#var:12adjust}}.Asst
|{{{car24|}}}
|fields=Carded_photo,Card_2,Model_name
|}}|}}
|where=Code like '{{{code|}}}{{{letter|}}}' {{#if:{{{year|}}}|AND Year like '%{{{year|}}}%'|}}
|}</includeonly><noinclude>
|order by=ListID
{{Construction}}
|delimiter={{#ifeq:{{{asst|}}}|DXV99|&nbsp;&&nbsp;|}}
[[Category:Content templates]]
}}</div><!--{{Case|asst={{{asst|}}}|code={{{code|}}}|letter={{{letter|}}}|car1={{{car1|}}}|car2={{{car2|}}}|car3={{{car3|}}}}}--></includeonly><noinclude>
==Usage==
This template is used to display the contents of a {{MDPC}} 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 [[Help:Cargo|database]] entry, from which it retrieves the links and photo.
 
===Intro===
First, you must fill out information about the case itself:
*{{param|asst}}, {{param|code}}, and {{param|letter}} - These correspond to the large nine-digit number on the box. Example:
{| class="wikitable" style="text-align:center"
|-
| DXV29
| -
| 958
| A
|-
| {{code|asst}}
|
| {{code|code}}
| {{code|letter}}
|}
 
You'll also generally need to specify the {{param|year}}, ex. 2024
 
===List of vehicles===
Writing out the contents list is straightforward; list out the names in the format <code><nowiki>|carX=name</nowiki></code> (X = line number, i.e. {{code|car1}}, {{code|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:
# 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.
# 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 {{code|sort name}} for the corresponding release is on its home [[Help:Vehicle|vehicle page]]. By default, a release's sort name is equivalent to its home '''page name''' - if {{param|sort_name}} is placed in the {{tem|vehicle infobox}}, ''that'' value then becomes the default for all &ndash; an individually assigned {{code|sort_name}} inside the {{tem|vehicle row}} overrides both.
** Their '''{{code|Assortment}}''' column is empty. Except for some [[multipacks]], the assortment code is automatically retrieved depending on the '''Series''' (and recursively {{code|'''Year'''}}/{{code|'''Sub'''}}) field inputs. This probably failed if the {{param|format}} parameter is either missing or incorrectly set. For most [[mainline]] series, the {{code|Single}} and {{code|2-pack}} values return their respective assortments &ndash; however, '''Deluxe''' single releases must have {{param|asst}} set to {{code|Deluxe}} in source mode.
<!-- * {{param|year}} - Should always be the '''series year'''. New series traditionaly begin 2-4 months before the actual change of calendar year - if 2024 Mainline Case A (11/1/23), you should put {{param|year}}{{code|2024}} and {{param|rel_year}}{{code|2023}} -->
{|class="wikitable"
|-
|<code><nowiki>|count=</nowiki></code>
|Determines number of cars, 6 per row: 12 by default; 18 for three rows, 24 for four
|-
|<code><nowiki>|car1=</nowiki></code><br><code><nowiki>|car2=</nowiki></code><br>&nbsp;etc.
|Put name of car, up to 24
|-
|<code><nowiki>|image1=</nowiki></code><br><code><nowiki>|image2=</nowiki></code><br>&nbsp;etc.
|Image corresponding to car number
|}
 
{| width=70%"
|-
|style="width:33%; vertical-align:top"|<pre>
{{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=
}}</pre>
|style="width:33%; vertical-align:top"|<pre>
{{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=
}}</pre>
|style="width:33%"|<pre>
{{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=
}}</pre>
|}
[[Category:Mattel templates]]
</noinclude>
</noinclude>

Latest revision as of 09:12, 18 September 2024

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=
}}