![]() |
VOOZH | about |
This template can be used to allow linking to a section of an article without the creation of headers. Common use cases include use within larger tables and after renaming a section.
If {{anchor|Example}} is placed on the next line, then Template:Anchor#Example will link to that line.
For example, this code:
{{anchor|Example}} Example anchor sentence.
Produces:
This template supports multiple parameters as well. So {{anchor|Example|Anchor|Test}} will create anchors "Example", "Anchor", and "Test" at the place of its usage.
Only thirteen anchors are supported in one call of the template, if you need any more, you will need to call a second instance of the template.
This template can also be used for adding another anchor to a section heading, for example:
== {{subst:anchor|Heading alias}} Heading ==
This is a content.
The code above creates "Heading alias" anchor precisely at "Heading" section. This enables editors linking either "Heading alias" or "Heading" to that section. This is useful when renaming a section heading, as the previous name might still be used for linking on other pages, and adding an anchor for it keeps the previous links working.
Remember to substitute correctly as to not cause any technical problems (see WP:ANCHORSUBST).
To add more anchor in the future, you may add the template after the span tag used to add the anchor:
== <span class="anchor" id="Heading alias"></span>{{subst:anchor|Another alias}} Heading ==
This is a content.
This is equivalent to {{subst:anchor|Headling alias|Another alias}}.
{{visible anchor}}, which shows the parameter as text{{section link}}, which generates a link to a specific section of a page