Template:Class/Format: Difference between revisions
Jump to navigation
Jump to search
HiddenDragon (talk | contribs) (Created page with "<includeonly><onlyinclude>{{#lvardef: class | {{#explode: {{{1}}}|:|0}}}}{{#lvardef: note | {{#explode: {{{1}}}|:|1}}}}{{Class|{{#lvar: class}}}} {{#if: {{#lvar:note}} | ({{#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. e.g. <pre>{{Class/Format|Light Domain:Domain Spell}}</pre> {{Class/Format|Light Domain:Domain Sp...") |
(Only split at first colon.) |
||
Line 1: | Line 1: | ||
<includeonly><onlyinclude>{{#lvardef: class | {{#explode: {{{1}}}|:|0}}}}{{#lvardef: note | {{#explode: {{{1}}}|:|1}}}}{{Class|{{#lvar: class}}}} {{#if: {{#lvar:note}} | ({{#lvar: note}}) |}}</onlyinclude></includeonly><noinclude> | <includeonly><onlyinclude>{{#lvardef: class | {{#explode: {{{1}}}|:|0}}}}{{#lvardef: note | {{#explode: {{{1}}}|:|1|2}}}}{{Class|{{#lvar: class}}}} {{#if: {{#lvar:note}} | ({{#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. | ||
Line 10: | Line 10: | ||
Can specify with links | Can specify with links | ||
<pre>{{Class/Format|Bard:[[Magical Secrets]]}}</pre> | <pre>{{Class/Format|Bard:via [[Magical Secrets]]}}</pre> | ||
{{Class/Format|Bard:via [[Magical Secrets]]}} | {{Class/Format|Bard:via [[Magical Secrets]]}} | ||
Line 19: | Line 19: | ||
<pre>{{Class/Format|College of Lore}}</pre> | <pre>{{Class/Format|College of Lore}}</pre> | ||
{{Class/Format|College of Lore}} | {{Class/Format|College of Lore}} | ||
<br> | |||
Only the first colon is interpreted in a special way, so the rest can contain colons without problems: | |||
<pre>{{Class/Format|Druid:via [[Wild Shape: Deep Rothé]]}}</pre> | |||
{{Class/Format|Druid:via [[Wild Shape: Deep Rothé]]}} | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 17:09, 7 March 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}}
(Domain Spell)
Can specify with links
{{Class/Format|Bard:via [[Magical Secrets]]}}
(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é]]}}
(via Wild Shape: Deep Rothé)