Template:Anchor/doc: Difference between revisions

From Portals of Phereon Wiki
Content added Content deleted
gamepedia>Game widow
(Created page with "{{doc/start}} Anchors are "jump points". Place them somewhere on a page and you will be able to link to that section of the page directly. Without the use of ==sections/headin...")
 
portalsofphereon>Plover-bot
m (→‎top: -interlangs)
Line 1: Line 1:
;Description
{{doc/start}}
:This creates one or more HTML anchors (up to 10) so you can jump to where this template appears with <code><nowiki>[[</nowiki></code>''pagename''<code>#</code>''anchorname''<code><nowiki>]]</nowiki></code>. The result of the template should not be visible on the page.
Anchors are "jump points". Place them somewhere on a page and you will be able to link to that section of the page directly. Without the use of ==sections/headings/titles==.


;Syntax
==Usage==
:Type <code>{{t|Anchor|anchorname1|...|anchorname10}}</code> somewhere.
<nowiki>{{</nowiki>Anchor|''Anchor ID''}}


;Example
*''Anchor ID'' is the text after the # character that you would like to be used in a link.
:<code><nowiki>{{Anchor|jumphere}}</nowiki></code> &rarr; {{Anchor|jumphere}}
*These anchors are invisible.
:.
:.
:.
:.
:.
:.
:.
:.
:.
:.
:.
:[[#jumphere|Click me to jump to anchor]].


<includeonly>
==How to link to anchors==
<!-- Any categories for the template itself -->
As an example, if you placed <nowiki>{{</nowiki>Anchor|Foo}} on the [[Sandbox]] page, you could use <nowiki>[[</nowiki>Sandbox#Foo]] as a link that jumps to it.
[[Category:Inline templates]]
{{doc/end}}
</includeonly><noinclude>
[[Category:Template documentation]]
</noinclude>

Revision as of 08:29, 4 January 2018

Description
This creates one or more HTML anchors (up to 10) so you can jump to where this template appears with [[pagename#anchorname]]. The result of the template should not be visible on the page.
Syntax
Type {{Anchor|anchorname1|...|anchorname10}} somewhere.
Example
{{Anchor|jumphere}}
.
.
.
.
.
.
.
.
.
.
.
Click me to jump to anchor.