Template:Creatures with the mutation: Difference between revisions

order by mutation level
(replacing with module)
(order by mutation level)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#invoke:CargoQuery|main
<includeonly>{{#invoke:CargoQuery|main
|q?tables=CreatureMutations,GeneralData
|tables=CreatureMutations=CM,GeneralData=GD
|q?join=CreatureMutations._pageName=GeneralData._pageName
|join=CM._pageName=GD._pageName
|q?fields=GeneralData.PlainName=Page
|fields={{favilink format args}}, CONCAT('(Level ', MutationLevel, ')')=outro
|q?where=Mutation = '{{{1|{{PAGENAME}}}}}' AND CreatureMutations._pageNamespace='0'
|where=Mutation = '{{{1|{{PAGENAME}}}}}' AND CM._pageNamespace='0'
|q?groupBy=CreatureMutations._pageName
|groupBy=CM._pageName
|template=favilink ul query}}</includeonly><noinclude>[[Category:Query Templates]]</noinclude>
|orderBy=CM.MutationLevel
|template=favilink format
|format = ul
|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>