Template:Anchor: Difference between revisions
Jump to navigation
Jump to search
(take out all #if statements as ParserFunctions is not installed. Add documentation) |
(clarify) |
||
Line 1: | Line 1: | ||
<span id="{{{1}}}"></span><noinclude> | <span id="{{{1}}}"></span><noinclude> | ||
== | ==Documentation== | ||
This template creates an anchor. It is useful for maintaining a link to a section where the section title has changed or may be changed in future. | This template creates an anchor. It is useful for maintaining a link to a section where the section title has changed or may be changed in future. | ||
The fixed way to link to a section is by including # between the page name and the section name, so this section right here is: | |||
:[[Template:Anchor# | :[[Template:Anchor#Documentation]] | ||
If | If you want this link to work even after someone might change the heading to something else, insert an anchor like this: | ||
<code><nowiki>{{anchor| | <code><nowiki>{{anchor|Documentation}}</nowiki></code> | ||
Then another page linking to # | Then another page linking to #Documentation on this page will still go to that anchor on the page, even if the section name changes. | ||
Latest revision as of 22:03, 19 October 2011
Documentation
This template creates an anchor. It is useful for maintaining a link to a section where the section title has changed or may be changed in future.
The fixed way to link to a section is by including # between the page name and the section name, so this section right here is:
If you want this link to work even after someone might change the heading to something else, insert an anchor like this:
{{anchor|Documentation}}
Then another page linking to #Documentation on this page will still go to that anchor on the page, even if the section name changes.