Template:CardQuery
From LOTR-TCG Wiki
This template is a Battlegrounds version of Template:t that returns only Battlegrounds minions.
Usage[edit]
{{CardQuery |layout= |where= |orderBy= |collapsed= |limit= |offset= }}
Parameters[edit]
layout
: Choose one of these layouts: table, image, table golden, image golden, or count. Default is table.where
: Where clauses, pretty much like SQL functions. Default isTemplate:t
, which means to search all minions available in Bob's Tavern.orderBy
: Order to sort the results. Default istechLevel ASC, name ASC
.collapsed
: If true (default), the table/card image list will be collapsed after the page is reloaded, and vice versa if false.limit
: Maximum number of cards to display. If the limit number and the results number are too high, it will display error: "The time allocated for running scripts has expired." Default is 500.offset
: the number of initial cards to skip. This combines withlimit
for separating lists whose the number of results are very high into individual pages/articles.
Where clauses[edit]
Here are some examples of where clauses you can use:
- Returns tavern minions (or buyable minions)
({{Bg buyable}})
- Returns Elemental pool
({{Cards tb|race}}="{{Minion type returns|Elemental}}" OR {{Cards tb|tags}}__full LIKE "%Elemental-related%")
({{Cards tb|race}}="ELEMENTAL" OR {{Cards tb|tags}}__full LIKE "%Elemental-related%")
({{Bg minion pool|Elemental}})
- Returns General minions
(Template:Cards tb IS NULL)
There are also available templates of where clauses:
Examples[edit]
{{List cards bg minions|layout=table|where={{Bg buyable}}|orderBy={{Cards tb|techLevel}} ASC, {{Cards tb|name}} ASC}}
returns:
{{List cards bg minions|layout=image|where={{Cards tb|race}}="{{Minion type returns|Beast}}" AND Cards.customCycles HOLDS "BG tavern token"|orderBy={{Cards tb|techLevel}} ASC, {{Cards tb|name}} ASC}}
returns: Template:List cards bg minions
See also[edit]
Error: join conditions must be set for tables.