Template:Where clause

From Hearthstone Wiki
Jump to: navigation, search

This template is used by other templates such as {{Cards}} and {{Custom card table}}, among others, that accept some or all of the same parameters as this template, and which need to build a valid where clause for a #cargo_query call from those they accept.

Because of numerous workarounds needed at the time of this writing, the where clause built is pretty ugly, which is one of the reasons this template exists.

This is intended primarily for use in query templates and probably has little value in direct use on articles.

Note: All parameters below are optional. If left blank, they will not affect what cards are shown.

{{Custom card table
  |categoryname=the exact name of a category to get cards from, not including the Category prefix. Multiple names can be provided separated by commas, and cards are returned only if they are in all the given categories.
  |category=name prefix of category to get cards from, should match that used for the category parameter on Card infobox. Multiple names can be provided separated by commas, and cards are returned only if they are in all the given categories.
  |bg_type="any" to get Battlegrounds and non-Battlegrounds cards, "either" to get Battlegrounds cards only, "regular" to get only non-gold Battlegrounds cards, "gold" to get only gold Battlegrounds cards, and "none" to get only non-Battlegrounds cards ("none" is default)
  |name=name of card(s) to show
  |tier=card tier, only relevant to Battlegrounds cards (a range can be specified using a minimum and maximum separated by ~)
  |type=type of cards to show
  |subtype=subtype of cards to show
  |class=class of cards to show, using "Any" for neutral cards
  |multiclass=multiclass of cards to show
  |rarity=rarity of cards to show
  |mana=mana cost of cards to show (a range can be specified using a minimum and maximum separated by ~)
  |attack=attack value of cards to show (a range can be specified using a minimum and maximum separated by ~)
  |health=health value of cards to show (a range can be specified using a minimum and maximum separated by ~)
  |gold=True to show only cards with a gold version, False to show only cards that do not
  |ability=show cards with this ability 
  |artist=show cards with this artist
  |voiceactor=show cards with this voice actor
  |tag=show cards with this tag
  |hiddentag=show cards with this hiddentag
  |collectible=True to show only collectible cards, False to show only uncollectible cards
  |set=page name of a set of cards to show
  |where=Overrides all other selection parameters above with an explicitly written Cargo query "where" clause.
}}