Jump to content
Toggle menu
  • 3 articles
  • 75 files
  • 7 users
  • 37.9K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Anchor/doc: Difference between revisions

Template page
add description, use TemplateData, remove dead interlanguage link
Fix language-code links to use Wikipedia interwiki prefixes
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Lua|Module:Anchor}}
{{TemplateBox
{{TemplateBox
|1        = anchor
|1        = 1
|1d-en    = The text that will be the anchor
|1aliases = anchor
|1label  = anchor text
|1label-en= First anchor
|1aliases = 1
|1d-en    = The text that will be the first anchor
|1type    = string/line
|1type    = line
|1def    = anchor
|1def    =  
|1stat    = required
|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
|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.
|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
|namespace          = all
|usergroup          = all
|usergroup          = all
Line 15: Line 30:
|usage-notes        =  
|usage-notes        =  
1. <code style="color:green;"><nowiki>{{anchor|foo}}</nowiki></code>
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 <code><nowiki>[[#foo|...]]</nowiki></code> from within the same article,  
: or it could be linked to with <tt><nowiki>[[</nowiki>''<small>articlename</small>''#foo<nowiki>|…]]</nowiki></tt> from other articles and from redirects.
: 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,
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>
:<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 <code><nowiki>[[</nowiki>''articlename''#foo<nowiki>]]</nowiki></code> would remain valid even if the section were renamed.
|type              =  
|type              =  
|example            =  
|example            =  
Line 32: Line 47:
|print              =  
|print              =  
|shorthand          =  
|shorthand          =  
|relieson          =  
|relieson          = [[Module:Anchor]]
|mustbesubst        =  
|mustbesubst        =  
|useTemplateData    = only
|useTemplateData    = only
Line 39: Line 54:
[[Category:Internal link templates]]
[[Category:Internal link templates]]


[[eo:Ŝablono:Ankro2]]
[[w:eo:Ŝablono:Ankro2]]
[[ja:Template:Anchor]]
[[w:ja:Template:Anchor]]
</includeonly>
</includeonly>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.