8,756
edits
(add default message when no results are returned) |
(order by mutation level) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#invoke:CargoQuery|main | <includeonly>{{#invoke:CargoQuery|main | ||
| | |tables=CreatureMutations=CM,GeneralData=GD | ||
| | |join=CM._pageName=GD._pageName | ||
| | |fields={{favilink format args}}, CONCAT('(Level ', MutationLevel, ')')=outro | ||
| | |where=Mutation = '{{{1|{{PAGENAME}}}}}' AND CM._pageNamespace='0' | ||
| | |groupBy=CM._pageName | ||
|orderBy=CM.MutationLevel | |||
|template=favilink format | |template=favilink format | ||
|format = ul | |format = ul | ||
|default = No creatures have this mutation by default.}}</includeonly><noinclude>[[Category:Query Templates]]</noinclude> | |default = {{#ifeq:{{{1|}}}|no default message||No creatures have this mutation by default.}}}}</includeonly><noinclude> | ||
Add to a mutation page to generate a bulleted list of creatures that have the mutation. | |||
If no creatures have the mutation, the statement "No creatures have this mutation by default." is printed instead. | |||
To suppress this message, you can add <code>no default message</code> as an argument to this template. | |||
== Usage == | |||
* <code><nowiki>{{creatures with the mutation}}</nowiki></code> | |||
* <code><nowiki>{{creatures with the mutation|no default message}}</nowiki></code> | |||
[[Category:Query Templates]]</noinclude> |