Template:Anchor/doc: Difference between revisions
Template page
More actions
m harmonisation |
use {{TemplateBox}}, remove interlanguage links that are same as on Wikidata |
||
| Line 1: | Line 1: | ||
{{ | {{TemplateBox | ||
|1 = anchor | |||
|1d-en = The text that will be the anchor | |||
|1label = anchor text | |||
|1aliases = 1 | |||
|1type = string/line | |||
|1def = anchor | |||
|1stat = required | |||
== | |name = anchor | ||
1. <code style="color:green;"><nowiki>{{ | |desc = | ||
|namespace = all | |||
|usergroup = all | |||
|placement = | |||
|usage-notes = | |||
1. <code style="color:green;"><nowiki>{{anchor|foo}}</nowiki></code> | |||
: could be linked to with <tt><nowiki>[[#foo|...]]</nowiki></tt> from within the same article, | : could be linked to with <tt><nowiki>[[#foo|...]]</nowiki></tt> from within the same article, | ||
: or it could be linked to with <tt><nowiki>[[</nowiki>''<small>articlename</small>''#foo | : or it could be linked to with <tt><nowiki>[[</nowiki>''<small>articlename</small>''#foo<nowiki>|…]]</nowiki></tt> from other articles and from redirects. | ||
2. Anchors can be more suitable for inter-article linking than section titles are. For example, | 2. Anchors can be more suitable for inter-article linking than section titles are. For example, | ||
:<code style="color:green;"><nowiki>=={{ | :<code style="color:green;"><nowiki>=={{anchor|foo}}</nowiki></code><code style="color:gray;"> Section title <nowiki>==</nowiki></code> | ||
:Here, links via <tt><nowiki>[[</nowiki>''articlename''#foo<nowiki>]]</nowiki></tt> would remain valid even if the section were renamed. | :Here, links via <tt><nowiki>[[</nowiki>''articlename''#foo<nowiki>]]</nowiki></tt> would remain valid even if the section were renamed. | ||
|type = | |||
|example = | |||
|example-value = | |||
|i18n-method = - | |||
|i18n-desc = | |||
|i18n-mediawiki-msg = | |||
|i18n-subpage = | |||
|seealso = | |||
|setscats = | |||
|print = | |||
|shorthand = | |||
|relieson = | |||
|mustbesubst = | |||
}}<includeonly> | |||
<includeonly> | |||
[[Category:Formatting templates]] | [[Category:Formatting templates]] | ||
[[Category:Internal link templates]] | [[Category:Internal link templates]] | ||
[[eo:Ŝablono:Ankro2]] | |||
[[ja:Template:Anchor]] | |||
[[nds:Vörlaag:Anchor]] | |||
[[eo: | |||
[[ja: | |||
[[nds: | |||
</includeonly> | </includeonly> | ||
Revision as of 19:10, 22 June 2015
No description yet available.
Usage
{{anchor |anchor= }}
1. {{anchor|foo}}
- could be linked to with [[#foo|...]] from within the same article,
- or it could be linked to with [[articlename#foo|…]] from other articles and from redirects.
2. Anchors can be more suitable for inter-article linking than section titles are. For example,
=={{anchor|foo}}Section title ==- Here, links via [[articlename#foo]] would remain valid even if the section were renamed.
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
anchor1 | anchor text | The text that will be the anchor | anchor | required |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Localization
This template is not intended to be localized.