No edit summary |
No edit summary |
||
| Line 12: | Line 12: | ||
Setting {{code|ref}} to any value creates a reference with the first parameter and the value of {{code|ref}} combined into the reference name. The second parameter is ignored if included. {{Code|<nowiki>{{src|sr5|ref=404}}</nowiki>}} | Setting {{code|ref}} to any value creates a reference with the first parameter and the value of {{code|ref}} combined into the reference name. The second parameter is ignored if included. {{Code|<nowiki>{{src|sr5|ref=404}}</nowiki>}} | ||
{{Return|{{src|sr5|ref=404}}}} | {{Return|{{src|sr5|ref=404}} | ||
==References== | |||
<references />}} | |||
Revision as of 15:22, 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. The second parameter is ignored if included. {{src|sr5|ref=404}}
