Template:Anchor/Doc
From PCSAR
The template {{Anchor|name|text}}
creates a named "anchor" around a body of text.
An anchor is a spot on the page which can be jumped to.
- name
- the name of the anchor.
- text
- (optional) the text which is to be displayed. If not given, nothing is displayed.
You type... | You get... |
---|---|
{{anchor|the spot|here's the spot}} | here's the spot |
{{anchor|other spot|here's the other spot}} | here's the other spot |
{{anchor|third spot}} |
Once you have the anchor in place, you can create a link to it using the standard formats.
Try clicking on the links in these examples to see the effect.
You type... | You get... |
---|---|
[[#the spot]] | #the spot |
[[Template:Anchor/Doc#other spot]] | Template:Anchor/Doc#other spot |
[[Template:Anchor/Doc#third spot|find third spot]] | find third spot |
If more than one anchor on the same page has the same name, only the first one can be the destination of a link.
You type... You get... {{anchor|the spot|a second anchor also called "the spot" can't be jumped to}}a second anchor also called "the spot" can't be jumped to