Difference between revisions of "Template:Card infobox"

From Artifact: The Dota Card Game Wiki
Jump to: navigation, search
m
 
Line 1: Line 1:
{{#vardefine:field_query|{{#if: {{{id|}}} | id="{{{id}}}" | name="{{BASEPAGENAME}}" }} }}{{#cargo_query:
+
<includeonly>{{#vardefine:field_query|{{#if: {{{id|}}} | id="{{{id}}}" | name="{{BASEPAGENAME}}" }} }}{{#cargo_query:
 
tables=card_data
 
tables=card_data
 
|fields=name,image,icon,type,subtype,color,manacost,goldcost,attack,armor,health,rarity,illustrator,text
 
|fields=name,image,icon,type,subtype,color,manacost,goldcost,attack,armor,health,rarity,illustrator,text
Line 10: Line 10:
 
|more results text=
 
|more results text=
 
|max display chars=5000
 
|max display chars=5000
  +
}}</includeonly>
}}
 
  +
<noinclude>{{doc}}</noinclude>

Latest revision as of 15:49, 14 December 2018

Template-info.png Documentation

This template draws data from a card page's associated data page that is populated through Template:Card data. It accepts an optional override parameter of id should the database load the incorrect card based on name alone.

It creates a instance of Card infobox aligned on the right side of the page. It also generates the first line of text on the page describing what the card is. Furthermore, this templates sets a custom og:description attribute on the page so that search engines like Google don't parse the Card infobox as the search description.

The majority of the wikitext powering these functions are loaded through a call to Template:Card infobox/inner by the Cargo query.