Anonymous
×
Create a new article
Write your page title here:
We currently have 55 articles on SR5 Foundry VTT System Wiki. Type your article name above or click on one of the titles below and start writing!



SR5 Foundry VTT System Wiki

Template:Source: Difference between revisions

m (Mr. Johnson moved page Template:Src to Template:Source without leaving a redirect: Text replacement - "Src" to "Source")
m (Text replacement - "Src" to "Source")
Line 1: Line 1:
{{Documentation}}
{{Documentation}}
<includeonly><onlyinclude>{{#if:{{{ref|}}}|{{#tag:ref|{{Category|{{Src/Text|{{{1}}}}}}} (p. {{{ref}}})|name="{{{1}}}-{{{ref}}}" |}}|{{Category|{{Src/Text|{{{1}}}}}}} {{#if:{{{2|}}}|(p. {{{2|}}})}}}}{{#ifeq:{{PAGENAME}}|{{#titleparts:{{FULLPAGENAME}}|1}}|[[Category:{{Src/Text|{{{1}}}}}]]|<!--Do Nothing-->}}</onlyinclude></includeonly>
<includeonly><onlyinclude>{{#if:{{{ref|}}}|{{#tag:ref|{{Category|{{Source/Text|{{{1}}}}}}} (p. {{{ref}}})|name="{{{1}}}-{{{ref}}}" |}}|{{Category|{{Source/Text|{{{1}}}}}}} {{#if:{{{2|}}}|(p. {{{2|}}})}}}}{{#ifeq:{{PAGENAME}}|{{#titleparts:{{FULLPAGENAME}}|1}}|[[Category:{{Source/Text|{{{1}}}}}]]|<!--Do Nothing-->}}</onlyinclude></includeonly>

Revision as of 03:19, 22 November 2023

Template:Source

Template:Source is used to create sourcebook references and categorize articles making them. It leverages Template:Source/Text to generate the appropriate strings.

Usage

It accepts one mandatory string parameter, one optional string parameter, and one optional named parameter:

  • 1 is a sourcebook abbreviation; valid options are listed in Template:Source/Abbreviations.
  • 2 is a page reference, typically a single integer or a range.
  • ref (defaults unset) is used to turn it into a reference.

Return

{{Source|sr5}} puts the article into the appropriate category, then returns: Adding the second parameter, e.g. {{Source|sr5|404}}, modifies the return:

Setting ref to any value creates a reference with the first parameter and the value of ref combined into the reference name. If ref is included, the second parameter is ignored. For instance, <p>My name is sr5-404{{Source|sr5|ref=404}}.<br />My name is also sr5-404{{Source|sr5|ref=404}}.</p> returns:

My name is sr5-404[1].
My name is also sr5-404[1].

...and...

The documentation above was transcluded from Template:Source/Documentation.