Template:Creatures with the mutation: Difference between revisions

(Add mutation level)
(order by mutation level)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#invoke:CargoQuery|main
<includeonly>{{#invoke:CargoQuery|main
|q?tables=CreatureMutations=CM,GeneralData=GD
|tables=CreatureMutations=CM,GeneralData=GD
|q?join=CM._pageName=GD._pageName
|join=CM._pageName=GD._pageName
|q?fields={{favilink format args}}, CONCAT('(Lv ', MutationLevel, ')')=outro
|fields={{favilink format args}}, CONCAT('(Level ', MutationLevel, ')')=outro
|q?where=Mutation = '{{{1|{{PAGENAME}}}}}' AND CM._pageNamespace='0'
|where=Mutation = '{{{1|{{PAGENAME}}}}}' AND CM._pageNamespace='0'
|q?groupBy=CM._pageName
|groupBy=CM._pageName
|orderBy=CM.MutationLevel
|template=favilink format
|template=favilink format
|format = ul
|format = ul
Line 13: Line 14:


To suppress this message, you can add <code>no default message</code> as an argument to this template.
To suppress this message, you can add <code>no default message</code> as an argument to this template.
{{creatures with the mutation|regeneration}}
== Usage ==
== Usage ==
* <code><nowiki>{{creatures with the mutation}}</nowiki></code>
* <code><nowiki>{{creatures with the mutation}}</nowiki></code>
* <code><nowiki>{{creatures with the mutation|no default message}}</nowiki></code>
* <code><nowiki>{{creatures with the mutation|no default message}}</nowiki></code>
[[Category:Query Templates]]</noinclude>
[[Category:Query Templates]]</noinclude>

Latest revision as of 13:49, 23 January 2023

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 no default message as an argument to this template.

Usage

  • {{creatures with the mutation}}
  • {{creatures with the mutation|no default message}}