Template:Anchor

From Terraria Wiki
Jump to navigation Jump to search
Important.svg
CAUTION: Terraria Wiki code is complex!!!
If you want to use this code on another wiki, wiki.gg staff are not able to assist you.
Please consider picking a different wiki to adapt code from, or making your own templates!
Remember that content on a wiki is more important than fancy formatting.
Template-info.svg Documentation The documentation below is transcluded from Template:Anchor/doc. (edit | history)

Use this template to create an HTML anchor at a point on a page. Anchors allow linking to a specific line on a page, which the client browser will automatically scroll to.

Usage

{{ anchor | <anchor name> | toc = 1–6/y/yes (optional) }}

First unnamed parameter

Name of the anchor.

toc

If this parameter is set, an invisible heading will be added, for linking from the table of contents. The default level of the heading is 3, though the desired level can be passed as the parameter's value (1 through 6).

Linking to anchors

Once an anchor is created, a link can be directed to it by adding a # symbol to the page name, followed by the anchor name, e.g. [[Page name#Anchor name]]

Example: