Template:Class/Format: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(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...")
 
(this forces the extra space to appear only when a :note is used, so parselist can finally stop , rendering , like , this)
 
(2 intermediate revisions by 2 users not shown)
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}}}}[[{{#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.


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>

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}}

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é)