Difference between revisions of "Template:Anchor"

From The Battle for Wesnoth Wiki
(Fix example)
(Add a hover text indicating that it can be linked to)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
Usage: <nowiki>{{Anchor|text}} or {{Anchor|id|text}}</nowiki>
 
Usage: <nowiki>{{Anchor|text}} or {{Anchor|id|text}}</nowiki>
  
In the first form, the text itself is used as the ID for the anchor. In this case, it ''must not'' contain non-alphanumeric characters!</noinclude><includeonly><span id="{{{1}}}">{{{2|{{{1}}}}}}</span>
+
In the first form, the text itself is used as the ID for the anchor. In this case, it ''must not'' contain non-alphanumeric characters! Also, if the text contains an equals sign, it must be specified as a named parameter by preceding it by '''2='''.</noinclude><includeonly><span id="{{{1}}}" title="Link here with #{{{1}}}">{{{2|{{{1}}}}}}</span>

Latest revision as of 14:43, 21 February 2024

Creates an arbitrary anchor on a page that can be linked to from elsewhere.

Usage: {{Anchor|text}} or {{Anchor|id|text}}

In the first form, the text itself is used as the ID for the anchor. In this case, it must not contain non-alphanumeric characters! Also, if the text contains an equals sign, it must be specified as a named parameter by preceding it by 2=.

This page was last edited on 21 February 2024, at 14:43.