Template:Food that grants: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
(support nobullets option)
(remove LIKE)
Line 1: Line 1:
<includeonly>{{#ifeq: {{{2|}}} | nobullets | |<ul><li>}}{{#invoke:CargoQuery|main
<includeonly>{{#ifeq: {{{2|}}} | nobullets | |<ul><li>}}{{#invoke:CargoQuery|main
|q?tables=Food, GeneralData
|tables=Food, GeneralData
|q?join=Food._pageName=GeneralData._pageName
|join=Food._pageName=GeneralData._pageName
|q?fields=PlainName=Page
|fields=PlainName=Page
|q?where=CookEffect HOLDS LIKE '%{{{1|}}}%' AND Food._pageNamespace = '0'
|where=CookEffect HOLDS '{{{1|}}}' AND Food._pageNamespace = '0'
|template=favilink
|template=favilink
|delimiter={{#ifeq: {{{2|}}} | nobullets |<br>|<li>}}
|delimiter={{#ifeq: {{{2|}}} | nobullets |<br>|<li>}}

Revision as of 15:30, 19 August 2020

Template that returns a bulleted list of all food items that grant the specified cooking effect provided in the first argument. This uses LIKE, so as long as the first argument contains the word, it will return.

Basic example

{{Food that grants|Heat}}

Output:

  • No Results!

Example with no bullets

{{Food that grants|Heat|nobullets}}

Output:

No Results!