Template:Creatures with the item: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
m (would this have worked)
(Replace default with more helpful message, small doc)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<ul>
<includeonly>{{#invoke:cargoQuery|main
<li>
|tables = GeneralData=GD,Inventory=I
{{#cargo_query:
|join on = GD.JoinKey= I.JoinKey
tables = GeneralData,Inventory
|fields = {{favilink format args}}
|join on = GeneralData._pageID = Inventory._pageID
|where = I.Item = '{{{1|{{PAGENAME}}}}}'
|fields = GeneralData.PlainName = Page
|format = ul
|where = BINARY Inventory.Item = '{{PAGENAME}}'
|template = favilink format
|format = template
|default = No creatures spawn with {{{1|{{PAGENAME}}}}}.
|template = favilink
}}</includeonly><noinclude>[[Category:Query Templates]]
|default = {{{1}}}
This template takes an optional one argument, which returns anything with the specified item page name. Leaving it blank will default to the page name the template was invoked on.
|delimiter = <li>
 
}}
== Usage ==
</li>
<pre>{{Creatures with the item|Desert rifle}}</pre>
</ul>
{{Creatures with the item|Desert rifle}}
<noinclude>[[Category:Query Templates]]</noinclude>
</noinclude>

Latest revision as of 13:42, 13 August 2021

This template takes an optional one argument, which returns anything with the specified item page name. Leaving it blank will default to the page name the template was invoked on.

Usage

{{Creatures with the item|Desert rifle}}

No creatures spawn with Desert rifle.