Anonymous
×
Create a new article
Write your page title here:
We currently have 205 articles on Shadowrun Seattle Shutdown. Type your article name above or click on one of the titles below and start writing!



Shadowrun Seattle Shutdown

Template:Src: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
{{Documentation}}
{{Documentation}}
<includeonly><onlyinclude>{{#vardefine:ref|{{{ref|}}}}}{{#if:{{{ref|}}}|<ref name="{{{1}}}-{{{ref}}}">{{{1}}} (p. {{#var:ref}})</ref>|{{Category|{{Src/Text|{{{1}}}}}}} {{#if:{{{2|}}}|(p. {{{2|}}})}}}}{{#ifeq:{{NAMESPACE}}|Template|<!--Do Nothing-->|[[Category:{{Src/Text|{{{1}}}}}]]}}</onlyinclude></includeonly>
<includeonly><onlyinclude>{{#vardefine:ref|{{{ref|}}}}}{{#vardefine:src|{{Src/Text|{{{1}}}}}{{#if:{{{ref|}}}|<ref name="{{{1}}}-{{{ref}}}">{{Category|{{#var:src}}}} (p. {{#var:ref}})</ref>|{{Category|{{Src/Text|{{{1}}}}}}} {{#if:{{{2|}}}|(p. {{{2|}}})}}}}{{#ifeq:{{NAMESPACE}}|Template|<!--Do Nothing-->|[[Category:{{Src/Text|{{{1}}}}}]]}}</onlyinclude></includeonly>

Revision as of 15:22, 8 November 2022

Icon-documentation.svg

Template:src is used to create sourcebook references and categorize articles making them. It leverages Template:src/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:src/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

{{src|sr5}} puts the article into the appropriate category, then returns:
{{#vardefine:src|Shadowrun Fifth Edition Core RulebookShadowrun Fifth Edition Core Rulebook
Adding the second parameter, e.g. {{src|sr5|404}}, modifies the return:
{{#vardefine:src|Shadowrun Fifth Edition Core RulebookShadowrun Fifth Edition Core Rulebook (p. 404)

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 if included. For instance, <p>My name is sr5-404{{src|sr5|ref=404}}.<br />My name is also sr5-404{{src|sr5|ref=404}}.</p> returns:

My name is sr5-404{{#vardefine:src|Shadowrun Fifth Edition Core Rulebook[1].
My name is also sr5-404{{#vardefine:src|Shadowrun Fifth Edition Core Rulebook[1].

References

  1. 1.0 1.1 [[:Category:|]] (p. 404)

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