8,290
edits
(remove LIKE) |
(Add comma delimited option) |
||
Line 1: | Line 1: | ||
<includeonly>{{#ifeq: {{{2|}}} | | <includeonly>{{#ifeq: {{{2|list}}}| list | <ul><li> }}{{#invoke:CargoQuery|main | ||
|tables=Food, GeneralData | |tables=Food, GeneralData | ||
|join=Food._pageName=GeneralData._pageName | |join=Food._pageName=GeneralData._pageName | ||
Line 5: | Line 5: | ||
|where=CookEffect HOLDS '{{{1|}}}' AND Food._pageNamespace = '0' | |where=CookEffect HOLDS '{{{1|}}}' AND Food._pageNamespace = '0' | ||
|template=favilink | |template=favilink | ||
|delimiter={{# | |delimiter={{#switch: {{{2|list}}} |list=<li> |linebreaks=<br> |,<nowiki> </nowiki> }} | ||
|default=No Results! | |default=No Results! | ||
}} | }} | ||
{{#ifeq: {{{2|}}} | | {{#ifeq: {{{2|list}}} | list | </ul> }}</includeonly><noinclude>[[Category:Query Templates]] | ||
Template that returns a bulleted list of all food items that grant the specified cooking effect provided in the first argument. This uses <code>LIKE</code>, so as long as the first argument contains the word, it will return. | Template that returns a bulleted list of all food items that grant the specified cooking effect provided in the first argument. This uses <code>LIKE</code>, so as long as the first argument contains the word, it will return. | ||
== | ==Default example== | ||
<pre>{{Food that grants|Heat}}</pre> | <pre>{{Food that grants|Heat}}</pre> | ||
Output: | Output: | ||
{{Food that grants|Heat}} | {{Food that grants|Heat}} | ||
==Example with | ==Example with linebreaks instead of bullets== | ||
<pre>{{Food that grants|Heat| | <pre>{{Food that grants|Heat|linebreaks}}</pre> | ||
Output:<br> | |||
{{Food that grants|Heat|linebreaks}}<br> | |||
==Example with commas == | |||
<pre>{{Food that grants|Heat|commas}}</pre> | |||
Output: | Output: | ||
{{Food that grants|Heat| | {{Food that grants|Heat|commas}}</noinclude> |