Difference between revisions of "Template:Anchor"
From Starfleet Commander
Jump to navigationJump to searchm |
m |
||
Line 1: | Line 1: | ||
<span id="{{{1|<span class="error">Missing reqired parameter</span>}}}">{{{2|}}}</span><noinclude> | <span id="{{{1|<span class="error">Missing reqired parameter</span>}}}">{{{2|}}}</span><noinclude> | ||
− | {{ | + | {{Doc-begin}} |
+ | __TOC__ | ||
+ | ==Functonality== | ||
+ | Creates an [[Wikipedia:HTML element#Anchor|HTML anchor]]. | ||
+ | |||
+ | This template is used to create a single tag or anchor. | ||
+ | <nowiki>{{Anchor|id|Text to display}}</nowiki> | ||
+ | |||
+ | ==Usage== | ||
+ | <nowiki>{{Anchor|parameter1|parameter2}}</nowiki> | ||
+ | |||
+ | * '''parameter1''' — ''required'' | ||
+ | *: This indicates the name of the HTML anchor | ||
+ | |||
+ | * '''parameter2''' — ''optional'' | ||
+ | *: This creates text to display at the location of the template | ||
+ | |||
+ | In order to access this link anchor, use <nowiki>[[</nowiki>[[{{FULLPAGENAME}}#{{{1|parameter1}}}|examplepagename#parameter1]]<nowiki>]]</nowiki> | ||
+ | |||
+ | ==Example== | ||
+ | <nowiki>{{Anchor|parameter1|parameter2}}</nowiki> | ||
+ | |||
+ | {{Anchor|parameter1|parameter2}} | ||
+ | |||
+ | [[Category:Templates|{{PAGENAME}}]] | ||
+ | {{Doc-end}} | ||
</noinclude> | </noinclude> |
Revision as of 01:25, 20 September 2011
<span id="Missing reqired parameter">
Template documentation
Functonality
Creates an HTML anchor.
This template is used to create a single tag or anchor.
{{Anchor|id|Text to display}}
Usage
{{Anchor|parameter1|parameter2}}
- parameter1 — required
- This indicates the name of the HTML anchor
- parameter2 — optional
- This creates text to display at the location of the template
In order to access this link anchor, use [[examplepagename#parameter1]]
Example
{{Anchor|parameter1|parameter2}}
parameter2
The above template can be edited by editors, and experiments can be done in this template's Sandbox and Testcases pages. Subpages of this template.