Mr. Johnson (talk | contribs) (Created page with "<includeonly>Category:Categorization Template</includeonly> {{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 {{Parameter|mandatory|string}}, one {{Parameter|optional|string}}, and one {{Parameter|optional|named}}: * {{Code|1}} is a sourcebook abbreviation; valid options are listed in {{Template|src/Abbreviations}}. * {{Code|2}}...") |
Mr. Johnson (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>[[Category:Categorization Template]]</includeonly> | <includeonly>[[Category:Categorization Template]][[Category:Reference Template]]</includeonly> | ||
{{Template|src}} is used to create sourcebook references and categorize articles making them. It leverages {{Template|src/Text}} to generate the appropriate strings. | {{Template|src}} is used to create sourcebook references and categorize articles making them. It leverages {{Template|src/Text}} to generate the appropriate strings. | ||
==Usage== | ==Usage== |
Revision as of 22:02, 21 November 2023
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 inTemplate: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:
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-404Template:Src.
My name is also sr5-404Template:Src.