Template:Anchor/doc: Difference between revisions
Content added Content deleted
(Use Template:Documentation subpage and add →Examples) |
imported>FrozenPlum m (Undo revision 1163 wrong window for category, oops) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
== How to link to anchors == |
== How to link to anchors == |
||
As an example, if you placed <nowiki>{{</nowiki>Anchor|Foo}} on |
As an example, if you placed <nowiki>{{</nowiki>Anchor|Foo}} on a sandbox page, you could use <nowiki>[[</nowiki>Sandbox#Foo]] as a link that jumps to it. |
||
== Examples == |
== Examples == |
||
Line 19: | Line 19: | ||
<!-- Template categories/interwikis here --> |
<!-- Template categories/interwikis here --> |
||
[[Category:Templates]] |
[[Category:Templates]] |
||
⚫ | |||
[[tr:Şablon:Çengel]] |
|||
⚫ | |||
<!-- Documentation categories/interwikis here --> |
|||
[[tr:Şablon:Çengel/belge]] |
|||
</noinclude> |
Latest revision as of 03:13, 30 March 2022
[purge]
This is the documentation page, it should be transcluded into the main template page. See Template:Documentation for more informationAnchors 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 ==.
Usage
{{Anchor|Anchor ID|...}}
- Anchor ID is the text after the # character that you would like to be used in a link.
- These anchors are invisible.
How to link to anchors
As an example, if you placed {{Anchor|Foo}} on a sandbox page, you could use [[Sandbox#Foo]] as a link that jumps to it.
Examples
{{Anchor|foo|bar|baz}}
{{#fornumargs:|v|<span id="{{#var:v}}"></span>}}