Template:Creatures with the mutation: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
(order by mutation level)
 
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('(Level ', 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 16: Line 17:
* <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}}