Template:Anchor/doc

From TibiaCraft
Revision as of 21:52, 4 October 2025 by Root (talk | contribs) (Created page with "{{Documentation header}} 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. == Usage == If <code><nowiki>{{anchor|Example}}</nowiki></code> is placed on the next line, then Template:Anchor#Example will link to that line. For example, this code: <syntaxhighlight lang=wikitext> {{anchor|Example}} Example anchor sentence. </syntaxhighligh...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
This is the documentation page. It should be transcluded into Template:Anchor. See Template:Documentation for more information.

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.

Usage

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:

Example anchor sentence.

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.

Multiple section heading anchors

This template can also be used for adding another anchor to a section heading, for example:

== Heading{{Anchor|Heading alias}} ==
This is a content.

The code above will create "Heading alias" anchor to "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.

See also