Template:Creatures with the item: Difference between revisions

Replace default with more helpful message, small doc
mNo edit summary
(Replace default with more helpful message, small doc)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><ul><li>{{#invoke:CargoQuery|main
<includeonly>{{#invoke:cargoQuery|main
|q?tables=GeneralData,Inventory
|tables = GeneralData=GD,Inventory=I
|q?join=GeneralData._pageID=Inventory._pageID
|join on = GD.JoinKey= I.JoinKey
|q?fields=GeneralData.PlainName=Page
|fields = {{favilink format args}}
|q?where= BINARY Inventory.Item='{{#replace:{{{1|{{PAGENAME}}}}}|'|''}}'
|where = I.Item = '{{{1|{{PAGENAME}}}}}'
|template=favilink
|format = ul
|delimiter=<li>}}</ul></includeonly><noinclude>[[Category:Query Templates]]</noinclude>
|template = favilink format
|default = No creatures spawn with {{{1|{{PAGENAME}}}}}.
}}</includeonly><noinclude>[[Category:Query Templates]]
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 ==
<pre>{{Creatures with the item|Desert rifle}}</pre>
{{Creatures with the item|Desert rifle}}
</noinclude>