Template:Anchor/doc: Difference between revisions
Template page
More actions
m harmonisation |
Fix language-code links to use Wikipedia interwiki prefixes |
||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{Lua|Module:Anchor}} | ||
{{TemplateBox | |||
|1 = 1 | |||
|1aliases = anchor | |||
|1label-en= First anchor | |||
|1d-en = The text that will be the first anchor | |||
|1type = line | |||
|1def = | |||
|1stat = required | |||
== | |2 = 2 | ||
|2label-en= Second anchor | |||
|2d-en = The text that will be the second anchor | |||
|2type = line | |||
|2def = | |||
|2stat = optional- | |||
|3 = 3 | |||
|3label-en= Third anchor | |||
|3d-en = The text that will be the third anchor | |||
|3type = line | |||
|3def = | |||
|3stat = optional- | |||
|name = anchor | |||
|desc-en = This template creates an anchor where it is placed, that is, a point which can be linked like a section header either from somewhere within that page, another Commons page, or another website. It has no visual output. (This template documentation lists three parameters, but you may use virtually any number of unnamed parameters for more anchors.) | |||
: | |namespace = all | ||
|usergroup = all | |||
|placement = | |||
|usage-notes = | |||
1. <code style="color:green;"><nowiki>{{anchor|foo}}</nowiki></code> | |||
: could be linked to with <code><nowiki>[[#foo|...]]</nowiki></code> from within the same article, | |||
: or it could be linked to with <code><nowiki>[[</nowiki>''<small>articlename</small>''#foo<nowiki>|…]]</nowiki></code> from other articles and from redirects. | |||
2. Anchors can be more suitable for inter-article linking than section titles are. For example, | |||
= | :<code style="color:green;"><nowiki>=={{anchor|foo}}</nowiki></code><code style="color:gray;"> Section title <nowiki>==</nowiki></code> | ||
:Here, links via <code><nowiki>[[</nowiki>''articlename''#foo<nowiki>]]</nowiki></code> would remain valid even if the section were renamed. | |||
|type = | |||
|example = | |||
|example-value = | |||
|i18n-method = - | |||
|i18n-desc = | |||
|i18n-mediawiki-msg = | |||
<includeonly> | |i18n-subpage = | ||
|seealso = | |||
|setscats = | |||
|print = | |||
|shorthand = | |||
|relieson = [[Module:Anchor]] | |||
|mustbesubst = | |||
|useTemplateData = only | |||
}}<includeonly> | |||
[[Category:Formatting templates]] | [[Category:Formatting templates]] | ||
[[Category:Internal link templates]] | [[Category:Internal link templates]] | ||
[[w:eo:Ŝablono:Ankro2]] | |||
[[w:ja:Template:Anchor]] | |||
[[ | |||
[[ | |||
</includeonly> | </includeonly> | ||