Template:Anchor
{{Anchor}} creates an anchorpoint on a page with the text inserted. This can be used for direct links, in tandem with the {{DL}} template.
For example, because the anchor template is used on the Pokémon Storage System page, linking to Pokémon Storage System#Battle Box results in the section itself being linked to (even though it is named Battle Box and Battle Teams), rather than the top of the page. Note that since the Battle Box redirect redirects to that anchor, linking to it does the same.
Usage
{{ anchor | <anchor name> | <anchor text> }}
Template fields
- 1: Anchor name - To be used when linking to this anchor point.
- 2: Anchor text - Optional. Text displayed for the anchor point. Can be omitted.
TemplateData
Creates an anchorpoint on a page with the text inserted
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Anchor name | 1 | To be used when linking to this anchor point | Line | required |
| Anchor text | 2 | Text displayed for the anchor point | Line | optional |
Examples
{{Anchor|Here}}
{{Anchor|There|To this text}}
To this text
{{DL||Here}}
{{DL||There}}
Additional notes
Instead of using {{anchor}} to create anchor points, they can be applied to other html elements like tables or divs directly. This section lists a few examples.
Tables
Instead of
| Cell 1 |
{| style="border: 2px solid gray; background: cyan; float:right"
|-
| {{anchor|Cell1|Cell 1}}
|}
{{DL||Cell1|To Cell 1}}
use:
| Row 1 |
{| style="border: 2px solid gray; background: cyan; float:right"
|- id="Row1"
| Row 1
|}
{{DL||Row1|To Row 1}}
Other Elements
Instead of
<div style="border: 2px solid gray; background: green; color: white; float:right">{{anchor|Div1|Div 1}}</div>
use:
<div id="Div2" style="border: 2px solid gray; background: green; color: white; float:right">Div 2</div>