Difference between revisions of "Template:Anchor"

From SoftMC-Wiki
Jump to: navigation, search
m (typo)
m (added description for underscores in anchor)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><span id={{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}>{{{1}}}</span></includeonly><!--  
+
<includeonly><span id={{anchorencode:{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}}}>{{{1}}}</span></includeonly><!--  
  
  
Line 15: Line 15:
 
;anchor (optional)
 
;anchor (optional)
 
: Anchor string. If missing, ''text'' is used as anchor string.
 
: Anchor string. If missing, ''text'' is used as anchor string.
 +
: Note: Spaces in ''anchor'' are converted to underscores (<code>_</code>)!
  
 
|examples=
 
|examples=
Line 20: Line 21:
 
<pre>
 
<pre>
 
* The {{Anchor|output}} is described below.
 
* The {{Anchor|output}} is described below.
* {{Anchor|Any Text with ''style''|myAnchor}}
+
* {{Anchor|Any Text with ''style''|my Anchor}}
 
</pre>
 
</pre>
 
;Output
 
;Output
 
* The {{Anchor|output}} is described below.
 
* The {{Anchor|output}} is described below.
*{{Anchor|Any Text with ''style''|myAnchor}}
+
*{{Anchor|Any Text with ''style''|my Anchor}}
 
;References
 
;References
: Go to [[#output]] or [[#myAnchor]].
+
: Go to [[#output]] or [[#my_Anchor]].
 
}}
 
}}
  

Latest revision as of 14:13, 7 November 2011

Adds a html anchor to the page, which can be referenced by #anchor.

Template

{{Anchor|text|anchor}}

Parameters

text
Display text
anchor (optional)
Anchor string. If missing, text is used as anchor string.
Note: Spaces in anchor are converted to underscores (_)!

Examples

Input
* The {{Anchor|output}} is described below.
* {{Anchor|Any Text with ''style''|my Anchor}}
Output
  • The output is described below.
  • Any Text with style
References
Go to #output or #my_Anchor.

For more examples refer to pages, which use this template: What links here.

Help:Templates describes general usage of templates, including treatment of special characters.


Long page simulation

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10