Template:Class/Format: Difference between revisions
Jump to navigation
Jump to search
(Only split at first colon.) |
(this forces the extra space to appear only when a :note is used, so parselist can finally stop , rendering , like , this) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><onlyinclude>{{#lvardef: class | {{#explode: {{{1}}}|:|0}}}}{{#lvardef: note | {{#explode: {{{1}}}|:|1|2}}}} | <includeonly><onlyinclude>{{#lvardef: class | {{#explode: {{{1}}}|:|0}}}}{{#lvardef: note | {{#explode: {{{1}}}|:|1|2}}}}[[{{#lvar: class}}]]{{#if: {{#lvar:note}} | <nowiki> </nowiki>({{#lvar: note}}) |}}</onlyinclude></includeonly><noinclude> | ||
Displays the class as [[Template:Class]] but with a note in parenthesis if specified by using a colon ':'. Intended to be used with cargo queries. | Displays the class as [[Template:Class]] but with a note in parenthesis if specified by using a colon ':'. Intended to be used with cargo queries. | ||
Latest revision as of 04:56, 15 October 2024
Displays the class as Template:Class but with a note in parenthesis if specified by using a colon ':'. Intended to be used with cargo queries.
e.g.
{{Class/Format|Light Domain:Domain Spell}}
Light Domain (Domain Spell)
Can specify with links
{{Class/Format|Bard:via [[Magical Secrets]]}}
Bard (via Magical Secrets)
If no colon, it will default to just Template:Class:
{{Class/Format|College of Lore}}
Only the first colon is interpreted in a special way, so the rest can contain colons without problems:
{{Class/Format|Druid:via [[Wild Shape: Deep Rothé]]}}
Druid (via Wild Shape: Deep Rothé)