Template:Anchor: Difference between revisions
Jump to navigation
Jump to search
imported>Errorage (1 revision) |
(Added includeonly-tags. Minor rewriting, fixing typo.) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{#if:{{{1|}}}|<span id="{{{1|}}}"></span>}}<noinclude> | <includeonly>{{#if:{{{1|}}}|<span id="{{{1|}}}"></span>}}</includeonly><noinclude> | ||
== | == About == | ||
Creates an invisible anchor which can be referenced in links. For example, linking to [[Engineering_items#Firesuit]] (Assuming you already have the anchor on the engineering items page to direct the link) will load the page focused on the firesuit. This is useful when you don't have a <code><nowiki>===header===</nowiki></code> for the item in the page. | |||
'''Beware:''' If the page already has a header with the same name as an anchor, a link to anchored item will go to whichever is first. So if the anchor is higher than the header, it will go to the anchor and vice versa. Alternatively, you can just make the anchor have a slightly different name to fix this. | |||
== Parameter-Usage == | |||
{| class="wikitable" | |||
!Parameter | |||
!Description | |||
|- | |||
!1 | |||
|Anchortext. If missing nothing will be added. | |||
|} | |||
== Examples == | |||
<pre>{{anchor|Test}} | |||
Click to jump: [[#Test]]</pre> | |||
{{anchor|Test}} | |||
Click to jump: [[#Test]] | |||
[[category:templates]] | [[category:templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 10:35, 24 April 2020
About
Creates an invisible anchor which can be referenced in links. For example, linking to Engineering_items#Firesuit (Assuming you already have the anchor on the engineering items page to direct the link) will load the page focused on the firesuit. This is useful when you don't have a ===header===
for the item in the page.
Beware: If the page already has a header with the same name as an anchor, a link to anchored item will go to whichever is first. So if the anchor is higher than the header, it will go to the anchor and vice versa. Alternatively, you can just make the anchor have a slightly different name to fix this.
Parameter-Usage
Parameter | Description |
---|---|
1 | Anchortext. If missing nothing will be added. |
Examples
{{anchor|Test}} Click to jump: [[#Test]]
Click to jump: #Test