Template:Food that grants: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(optimizing) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#ifeq: {{{2|list}}}| list | <ul><li> }}{{#invoke:CargoQuery| | <includeonly>{{#ifeq: {{{2|list}}}| list | <ul><li> }}<!-- | ||
|tables=Food, GeneralData | -->{{#invoke:CargoQuery|compound | ||
|1=tables=Food=F,GeneralData=GD | |||
;join on=F.ObjectID=GD.ObjectID | |||
;fields={{Favilink format args}} | |||
| | ;where=F.CookEffect HOLDS '{{{1|}}}' AND F._pageNamespace = '0' | ||
|2=tables=Liquids=L,GeneralData=GD | |||
;join on=L.ObjectID=GD.ObjectID | |||
;fields={{Favilink format args}} | |||
;where=L.CookEffect HOLDS '{{{1|}}}' AND L._pageNamespace = '0' | |||
|default=No Results! | |default=No Results! | ||
|template=favilink format | |||
|delimiter = {{#switch: {{{2|list}}} |list=<li> |linebreaks=<br> |,<nowiki> </nowiki> }} | |||
}} | }} | ||
{{#ifeq: {{{2|list}}} | list | </ul> }}</includeonly><noinclude>[[Category:Query Templates]] | {{#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 | Template that returns a bulleted list of all food items that grant the specified cooking effect provided in the first argument. | ||
==Default example== | ==Default example== |
Latest revision as of 19:18, 9 February 2021
Template that returns a bulleted list of all food items that grant the specified cooking effect provided in the first argument.
Default example
{{Food that grants|Heat and fire-based}}
Output:
Example with linebreaks instead of bullets
{{Food that grants|Heat and fire-based|linebreaks}}
Output:
congealed blaze
cured dawnglider tail
fire ant gaster paste
Example with commas
{{Food that grants|Heat and fire-based|commas}}
Output:
congealed blaze, cured dawnglider tail, fire ant gaster paste