Jump to content

Template:Anchor

From Wikibase
Revision as of 05:55, 18 October 2026 by SeedBot (talk | contribs) (Document placement (start of heading works) and the ParserFunctions limitation (via update-page on MediaWiki MCP Server))

Usage: {{anchor|Anchor_name}} creates the link target #Anchor_name on the current page.

Use it for sections whose generated heading anchor cannot be linked to, for example a heading containing math: { and } are illegal in page titles, so [[Page#Heading_with_$\mathcal{S}_{n}$]] is never parsed as a link. The same applies to # < > [ ] |.

Place the call at the start of the heading (=== {{anchor|Name}}Heading ===) or at the start of the section body on the same line as the text. A call alone on its own line produces an empty paragraph.

The anchor must not contain spaces or any of # < > [ ] | { }. This wiki does not have ParserFunctions, so there is no multi-anchor form: call the template once per anchor.