Template:Anchor

From 2d4chan
Jump to navigation Jump to search

This template adds an HTML anchor to the page (silently, i.e. without displaying any text in the page's user-facing content). Think of it as a "phantom section" that can be linked to by an internal link containing a pound sign -- e.g. if a page contains {{anchor|foo}}, that part of the page can be linked to by [[#foo]] from the same page, or [[Page Name#foo]] from another page. Up to ten alternate titles can be defined at any call, e.g. {{anchor|foo|bar}} (using more results in an error). Note that they are case-sensitive, and may not like special characters.

Anchors allow editors to link to a specific part of a page even if there is no section header there. They can also be useful if an editor wishes to rename a section without breaking all of the links that lead to that section (just drop {{anchor|Old Section Name}} into the header).

For more information, see Template:Anchor on Wikipedia (which is the source of this template).