No edit summary |
No edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation}} | {{Documentation}} | ||
<includeonly><onlyinclude>{{#if:{{{ref|}}}| | <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> | ||
Latest revision as of 17:32, 8 November 2022
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:
1is a sourcebook abbreviation; valid options are listed inTemplate:src/Abbreviations.2is 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:
Adding the second parameter, e.g. {{src|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 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[1].
My name is also sr5-404[1].
References
- ↑ 1.0 1.1 Shadowrun Fifth Edition Core Rulebook (p. 404)
The documentation above was transcluded from Template:Src/Documentation. [edit]
