Hearthstone Wiki
No edit summary
No edit summary
(7 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
| colspan="3" style="text-align: left;" |
 
| colspan="3" style="text-align: left;" |
 
{{#ifeq:{{lc:{{{is_data_page|}}} }}|true|
 
{{#ifeq:{{lc:{{{is_data_page|}}} }}|true|
{{#switch:{{#ask: [[Has data page::{{FULLPAGENAME}}]]|format=count}}
+
{{#switch:{{#cargo_query:table=Cards|where=data_page="{{FULLPAGENAME}}"|fields=COUNT(*)|no html|default=0}}
|1=The card content page currently using this data is: {{#ask: [[Has data page::{{FULLPAGENAME}}]]}} {{#ifeq:{{lc:{{#var:setdata}} }}|no||{{#set:Has page={{#ask: [[Has data page::{{FULLPAGENAME}}]]|link=none}} }} }}
+
|1=The card content page currently using this data is: {{#cargo_query:table=Cards|where=data_page="{{FULLPAGENAME}}"|limit=1|more results text=|fields=_pageName}}
   
 
* '''It's possible for this to be out of date due to caching.''' If this seems incorrect, try {{editlink|{{FULLPAGENAME}}|opening this page for editing}} and ''save without making any changes'' to get current results.
 
* '''It's possible for this to be out of date due to caching.''' If this seems incorrect, try {{editlink|{{FULLPAGENAME}}|opening this page for editing}} and ''save without making any changes'' to get current results.
Line 15: Line 15:
 
| A page named [[{{{page|}}}]] already exists.
 
| A page named [[{{{page|}}}]] already exists.
 
**If it should already be using this data page, make sure it is using {{t|Card infobox}} correctly ''after'' trying resaving as described above.
 
**If it should already be using this data page, make sure it is using {{t|Card infobox}} correctly ''after'' trying resaving as described above.
**'''But''' there may be another card or topic with the same name. If so, you can create another page, such as perhaps [[{{{page|}}} ({{#switch:{{lc:{{{type}}} }}|ability|spell=spell|weapon|equipment=equipment|minion=minion|{{lc: {{{type|}}} }} }})]] and use <tt>datapage</tt> or other parameters on {{t|Card Infobox}} to match that page up with this page.
+
**'''But''' there may be another card or topic with the same name. If so, you can create another page, such as perhaps [[{{{page|}}} ({{#switch:{{lc:{{{type}}} }}|ability|spell=spell|weapon|equipment=equipment|minion=minion|{{lc: {{{type|}}} }} }})]] and use <code>datapage</code> or other parameters on {{t|Card Infobox}} to match that page up with this page.
 
| No page named [[{{{page|}}}]] currently exists. The card content page could be created here using {{t|Card infobox}}.
 
| No page named [[{{{page|}}}]] currently exists. The card content page could be created here using {{t|Card infobox}}.
 
}}
 
}}
|[[Category:Card data used by multiple pages]]'''More than one card content page is using this data.''' They include: {{#ask: [[Has data page::{{FULLPAGENAME}}]]}}
+
|[[Category:Card data used by multiple pages]]'''More than one card content page is using this data.''' They include: {{#cargo_query:table=Cards|where=data_page="{{FULLPAGENAME}}"|format=ul|fields=_pageName}}
   
 
* '''It's possible for this to be out of date due to caching.''' If this seems incorrect, try {{editlink|{{FULLPAGENAME}}|opening this page for editing}} and ''save without making any changes'' to get current results.
 
* '''It's possible for this to be out of date due to caching.''' If this seems incorrect, try {{editlink|{{FULLPAGENAME}}|opening this page for editing}} and ''save without making any changes'' to get current results.
* Having more than one card content page using this data can cause errors. You may want to use <tt>datapage</tt> or other parameters on {{t|Card Infobox}} on one of these pages to change which data page it is using, you may want to remove <nowiki>{{Card infobox}}</nowiki> from one of those pages altogether, or one of the pages may need to be moved or deleted.
+
* Having more than one card content page using this data can cause errors. You may want to use <code>datapage</code> or other parameters on {{t|Card Infobox}} on one of these pages to change which data page it is using, you may want to remove <nowiki>{{Card infobox}}</nowiki> from one of those pages altogether, or one of the pages may need to be moved or deleted.
 
}}
 
}}
 
|This section will contain information on the content pages using this data page.
 
|This section will contain information on the content pages using this data page.
Line 55: Line 55:
 
!<span title="These are the values assigned to each parameter.">Value</span>
 
!<span title="These are the values assigned to each parameter.">Value</span>
 
!<span title="These are the variables the values are assigned to for processing by the infobox/content template.">Variable</span>
 
!<span title="These are the variables the values are assigned to for processing by the infobox/content template.">Variable</span>
!<span title="These are the properties the infobox/content template should use for storing these values. Note that the values may need some processing first and are not necessary stored exactly as shown here.">Property</span>
 
 
|-
 
|-
|<tt>name</tt>
+
|<code>name</code>
|<tt>{{#var:name}}</tt>
+
|<code>{{#var:name}}</code>
|<tt>name</tt>
+
|<code>name</code>
|[[Property:Has name|Has name]]
 
 
|-
 
|-
|<tt>link</tt>
+
|<code>link</code>
|<tt>{{#var:link}}</tt>
+
|<code>{{#var:link}}</code>
|<tt>link</tt>
+
|<code>link</code>
|[[Property:Has Hearthpwn page|Has Hearthpwn page]]
 
 
|-
 
|-
|<tt>image</tt>
+
|<code>image</code>
|<tt>{{#var:image}}</tt>
+
|<code>{{#var:image}}</code>
|<tt>image</tt>
+
|<code>image</code>
|[[Property:Has image|Has image]]
 
 
|-
 
|-
|<tt>has_gold</tt>
+
|<code>has_gold</code>
|<tt>{{#var:has_gold}}</tt>
+
|<code>{{#var:has_gold}}</code>
|<tt>has_gold</tt>
+
|<code>has_gold</code>
|[[Property:Has gold version|Has gold version]]
 
 
|-
 
|-
|<tt>gold_image</tt>
+
|<code>gold_image</code>
|<tt>{{#var:gold_image}}</tt>
+
|<code>{{#var:gold_image}}</code>
|<tt>gold_image</tt>
+
|<code>gold_image</code>
|[[Property:Has gold image|Has gold image]]
 
 
|-
 
|-
|<tt>set</tt>
+
|<code>bg_type</code>
|<tt>{{#var:set}}</tt>
+
|<code>{{#var:bg_type}}</code>
|<tt>set</tt>
+
|<code>bg_type</code>
|[[Property:Is part of set|Is part of set]]
 
 
|-
 
|-
|<tt>type</tt>
+
|<code>tier</code>
|<tt>{{#var:type}}</tt>
+
|<code>{{#var:tier}}</code>
|<tt>type</tt>
+
|<code>tier</code>
|[[Property:Has card type|Has card type]]
 
 
|-
 
|-
|<tt>subtype</tt>
+
|<code>set</code>
|<tt>{{#var:subtype}}</tt>
+
|<code>{{#var:set}}</code>
|<tt>subtype</tt>
+
|<code>set</code>
|[[Property:Has card subtype|Has card subtype]]
 
 
|-
 
|-
|<tt>class</tt>
+
|<code>type</code>
|<tt>{{#var:class}}</tt>
+
|<code>{{#var:type}}</code>
|<tt>class</tt>
+
|<code>type</code>
|[[Property:Has class|Has class]]
 
 
|-
 
|-
|<tt>multiclass</tt>
+
|<code>subtype</code>
|<tt>{{#var:multiclass}}</tt>
+
|<code>{{#var:subtype}}</code>
|<tt>multiclass</tt>
+
|<code>subtype</code>
|[[Property:Has multiclass|Has multiclass]]
 
 
|-
 
|-
|<tt>rarity</tt>
+
|<code>class</code>
|<tt>{{#var:rarity}}</tt>
+
|<code>{{#var:class}}</code>
|<tt>rarity</tt>
+
|<code>class</code>
|[[Property:Has rarity|Has rarity]]<br />[[Property:Has rarity/index|Has rarity/index]]
 
 
|-
 
|-
|<tt>cost</tt>
+
|<code>multiclass</code>
|<tt>{{#var:cost}}</tt>
+
|<code>{{#var:multiclass}}</code>
|<tt>cost</tt>
+
|<code>multiclass</code>
|[[Property:Has mana cost|Has mana cost]]
 
 
|-
 
|-
|<tt>attack</tt>
+
|<code>rarity</code>
|<tt>{{#var:attack}}</tt>
+
|<code>{{#var:rarity}}</code>
|<tt>attack</tt>
+
|<code>rarity</code>
|[[Property:Has attack|Has attack]]
 
 
|-
 
|-
|<tt>hp</tt>
+
|<code>cost</code>
|<tt>{{#var:hp}}</tt>
+
|<code>{{#var:cost}}</code>
|<tt>hp</tt>
+
|<code>cost</code>
|[[Property:Has health|Has health]]
 
 
|-
 
|-
|<tt>heroichp</tt>
+
|<code>attack</code>
|<tt>{{#var:heroichp}}</tt>
+
|<code>{{#var:attack}}</code>
|<tt>heroichp</tt>
+
|<code>attack</code>
|[[Property:Has heroic health|Has heroic health]]
 
 
|-
 
|-
|<tt>armor</tt>
+
|<code>hp</code>
|<tt>{{#var:armor}}</tt>
+
|<code>{{#var:hp}}</code>
|<tt>armor</tt>
+
|<code>hp</code>
|[[Property:Has armor|Has armor]]
 
 
|-
 
|-
|<tt>heroicarmor</tt>
+
|<code>heroichp</code>
|<tt>{{#var:heroicarmor}}</tt>
+
|<code>{{#var:heroichp}}</code>
|<tt>heroicarmor</tt>
+
|<code>heroichp</code>
|[[Property:Has heroic armor|Has heroic armor]]
 
 
|-
 
|-
|<tt>abilities</tt>
+
|<code>armor</code>
|<tt>{{#var:abilities}}</tt>
+
|<code>{{#var:armor}}</code>
|<tt>abilities</tt>
+
|<code>armor</code>
|[[Property:Has abilities|Has abilities]]
 
 
|-
 
|-
|<tt>desc</tt>
+
|<code>heroicarmor</code>
  +
|<code>{{#var:heroicarmor}}</code>
|<tt><div><div>{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#var:desc}}|}}|&lt;|<}}|&gt;|>}}|<br>|</div><div>}}|<br/>|</div><div>}}|<br />|</div><div>}}</div></div>|&nbsp;}}</div></tt>
 
|<tt>desc</tt>
+
|<code>heroicarmor</code>
|[[Property:Has description|Has description]]
 
 
|-
 
|-
|<tt>flavor</tt>
+
|<code>abilities</code>
  +
|<code>{{#var:abilities}}</code>
|<tt><div><div>{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#var:flavor}}|&lt;|<}}|&gt;|>}}|<br>|</div><div>}}|<br/>|</div><div>}}|<br />|</div><div>}}</div></div>|&nbsp;}}</div></tt>
 
|<tt>flavor</tt>
+
|<code>abilities</code>
  +
|-
|[[Property:Has flavor text|Has flavor text]]
 
  +
|<code>desc</code>
 
|<code><div>{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#var:desc}}|&lt;|<}}|&gt;|>}}|<br>|</div><div>}}|<br/>|</div><div>}}|<br />|</div><div>}}</div></code>
  +
|<code>desc</code>
  +
|-
  +
|<code>flavor</code>
 
|<code><div>{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#var:flavor}}|&lt;|<}}|&gt;|>}}|<br>|</div><div>}}|<br/>|</div><div>}}|<br />|</div><div>}}</div></code>
  +
|<code>flavor</code>
  +
|-
  +
| colspan="4" | If <code>desc</code> or <code>flavor</code> show raw html tags like <code>&lt;/div&gt;</code>, there is probably a <code>&lt;br&gt;</code> tag inside a <code>&lt;b&gt;</code> or <code>&lt;i&gt;</code> tag (or any other HTML tag, for that matter. The new description format for the tables, which hides all lines but the first until the mouse hovers over, can't properly cope with that. Please close any tags before a <code>&lt;br&gt;</code> and reopen them after if necessary.
 
|}
 
|}
 
|}{{#ifeq:{{lc:{{{is_data_page|}}} }}|true|[[Category:Imported card data|{{SUBPAGENAME}}]]{{DEFAULTSORT:{{SUBPAGENAME}} }}|}}</onlyinclude>{{doc}}
 
|}{{#ifeq:{{lc:{{{is_data_page|}}} }}|true|[[Category:Imported card data|{{SUBPAGENAME}}]]{{DEFAULTSORT:{{SUBPAGENAME}} }}|}}</onlyinclude>{{doc}}

Revision as of 00:30, 5 December 2019

This is the data page for this card.

This section will contain information on the content pages using this data page.

On an actual card data page, the normal image will appear here if it exists. On an actual card data page, the gold image will appear here if it exists.
Parameter Value Variable
name name
link link
image image
has_gold has_gold
gold_image gold_image
bg_type bg_type
tier tier
set set
type type
subtype subtype
class class
multiclass multiclass
rarity rarity
cost cost
attack attack
hp hp
heroichp heroichp
armor armor
heroicarmor heroicarmor
abilities abilities
desc
desc
flavor
flavor
If desc or flavor show raw html tags like </div>, there is probably a <br> tag inside a <b> or <i> tag (or any other HTML tag, for that matter. The new description format for the tables, which hides all lines but the first until the mouse hovers over, can't properly cope with that. Please close any tags before a <br> and reopen them after if necessary.

This template performs the visual work for {{Card data}}. It isn't intended for direct use.