Template:Anchor/doc: Difference between revisions

no edit summary
m (4 revisions imported: Import from https://k6ka.miraheze.org/)
No edit summary
Line 1:
The template <nowiki>{{</nowiki>[[{{ns:Template}}:{{BASEPAGENAME}}|{{lc:{{BASEPAGENAME}}}}]]<nowiki>}}</nowiki> inserts one or more [[Wikipedia:HTML element#Anchor|HTML anchor]]s in a page. Those locations can then be linked to using <code><nowiki>[[#link|...]]</nowiki></code> syntax. {{#ifeq:{{BASEPAGENAME}}|Visible anchor|&nbsp;Unlike {{tl|Anchor}}, the first parameter will be visible text on the page. See the "[[#Usage details|Usage details]]" section for an example.|}}
<includeonly>[[Category:General wiki templates|{{PAGENAME}}]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
 
==Description==
{{Wikipedia}}
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.
 
==Syntax==
Type <code>{{t|Anchor|anchorname1|...|anchorname10}}</code> somewhere.
 
==Example==
:<code><nowiki>{{Anchor|jumphere}}</nowiki></code> &rarr; {{Anchor|jumphere}}
:.
:.
:.
:.
:.
:.
:.
:.
:.
:.
:.
:[[#jumphere|Click me to jump to anchor]].
 
==Credits==
The template code was taken from the [[wikia:w:c:templates:Template:Anchor|Templates Wiki]] on Wikia.
 
<includeonly>[[Category:General wiki templates|{{PAGENAME}}]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>