Template:Anchor: Difference between revisions
More actions
cat / doc |
backwards-compatible {{{anchor|{{{1|anchor}}}}}} to also allow a simple {{anchor|NAME}} as on WP |
||
| Line 1: | Line 1: | ||
<span id="{{{anchor|anchor}}}" /><noinclude> | <span id="{{{anchor|{{{1|anchor}}}}}}" /><noinclude> | ||
==Usage {{anchor|Example anchor}}== | |||
Inserts a HTML anchor in a page at the location of its invocation, enabling direct #Links to this location. | Inserts a HTML anchor in a page at the location of its invocation, enabling direct #Links to this location. | ||
;Code | |||
: <nowiki><</nowiki>span id="<nowiki>{{{anchor|{{{1|anchor}}}}}}</nowiki>" /> | |||
''' | ;Usage | ||
: <nowiki>{{</nowiki>anchor|''anchor_name''}} | |||
: <nowiki>{{</nowiki>anchor|1=''anchor_name''}} | |||
: <nowiki>{{</nowiki>anchor|anchor=''anchor_name''}} | |||
==Example== | |||
==== | ====Usage <nowiki>{{</nowiki>anchor|Example anchor}}==== | ||
or | |||
====Usage <nowiki>{{</nowiki>anchor|anchor=Example anchor}}==== | |||
''[[Template:Anchor#Example anchor]] or [[#Example anchor]] ( | ''[[Template:Anchor#Example anchor]] (from another page) or [[#Example anchor]] (from this page) will now link to the section called "Usage", as seen above.'' | ||
[[Category:Miscellaneous templates|{{PAGENAME}}]] | [[Category:Miscellaneous templates|{{PAGENAME}}]] | ||
Revision as of 22:58, 4 June 2008
Usage
Inserts a HTML anchor in a page at the location of its invocation, enabling direct #Links to this location.
- Code
- <span id="{{{anchor|{{{1|anchor}}}}}}" />
- Usage
- {{anchor|anchor_name}}
- {{anchor|1=anchor_name}}
- {{anchor|anchor=anchor_name}}
Example
====Usage {{anchor|Example anchor}}====
or
====Usage {{anchor|anchor=Example anchor}}====
Template:Anchor#Example anchor (from another page) or #Example anchor (from this page) will now link to the section called "Usage", as seen above.
ar:template:anchor bg:template:anchor ca:template:anchor cs:template:anchor da:template:anchor de:Vorlage:Anker el:template:anchor en:template:anchor eo:template:anchor eu:template:anchor fa:template:anchor fi:template:anchor fr:template:anchor hsb:template:anchor he:תבנית:עוגן2 hu:template:anchor is:template:anchor ja:template:anchor ko:template:anchor ks:template:anchor la:template:anchor mi:template:anchor nds:template:anchor nl:template:anchor nn:template:anchor no:template:anchor oc:template:anchor pl:template:anchor ps:template:anchor pt:template:anchor rmy:template:anchor ro:template:anchor ru:template:anchor sd:template:anchor simple:template:anchor sl:template:Sidro sq:template:anchor sr:template:anchor sv:template:anchor sw:template:anchor te:template:anchor tn:template:anchor uk:template:anchor ur:template:anchor vi:template:anchor yi:template:anchor zh:template:anchor