Template:Anchor

From PCSAR

Jump to: navigation, search

This is the documentation for the template Template:Anchor

Template:Anchor/Doc:

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#other spot]] 
Template:Anchor#other spot
[[Template:Anchor#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



To see how this template is implemented, edit this page and examine the portion between <includeonly> and </includeonly>.

Personal tools