No edit summary |
No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><!--Template Subcategories--></includeonly> | <includeonly><!--Template Subcategories--></includeonly> | ||
{{Template|Anchor}} is used to create HTML anchors via span IDs. | {{Template|Anchor}} is used to create HTML and wikitext anchors via span IDs. | ||
==Usage== | ==Usage== | ||
It accepts one {{Parameter|mandatory|string}}, the reference text. | It accepts one {{Parameter|mandatory|string}}, the reference text. | ||
==Returns== | ==Returns== | ||
{{Code|<nowiki>{{Anchor|B21}}</nowiki>}} on [[SCIRE]] returns the text, and allows a URL like {{Code|<nowiki>http://wiki.s3.privateworks.com/index.php/SCIRE#B21</nowiki>}} or a wiki reference to {{Code|<nowiki>[[SCIRE#B21]]</nowiki>}} to link directly to that section of the text: {{Return|[[SCIRE#B21]]}} | {{Code|<nowiki>{{Anchor|B21}}</nowiki>}} on [[SCIRE]] returns the text, and allows a URL like {{Code|<nowiki>http://wiki.s3.privateworks.com/index.php/SCIRE#B21</nowiki>}} or a wiki reference to {{Code|<nowiki>[[SCIRE#B21]]</nowiki>}} to link directly to that section of the text: {{Return|[[SCIRE#B21]]}} | ||
==Notes== | |||
Headings automatically create their own anchors, e.g. {{Code|<nowiki>[[SCIRE#Basement_Levels]]</nowiki>}} creates a link: {{Return|[[SCIRE#Basement_Levels]]}} | |||
Latest revision as of 12:52, 7 May 2023
Template:Anchor is used to create HTML and wikitext anchors via span IDs.
Usage
It accepts one mandatory string parameter, the reference text.
Returns
{{Anchor|B21}} on SCIRE returns the text, and allows a URL like http://wiki.s3.privateworks.com/index.php/SCIRE#B21 or a wiki reference to [[SCIRE#B21]] to link directly to that section of the text:
Notes
Headings automatically create their own anchors, e.g. [[SCIRE#Basement_Levels]] creates a link:
