Difference between revisions of "Template:Article link"
(New template proposal) |
m (10 revisions imported) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude> | + | <noinclude> |
− | </noinclude>{{Section link|{{ARTICLEPAGENAME}}| | + | </noinclude>{{Section link|1={{ARTICLEPAGENAME}}|2={{{1|}}}|3={{{2|}}}|4={{{3|}}}|5={{{4|}}}|6={{{5|}}}|7={{{6|}}}|8={{{7|}}}|9={{{8|}}}|nopage=y}}<noinclude> |
{{Documentation|content= | {{Documentation|content= | ||
− | + | This is a special-purpose variant of {{tlx|Section link}} for linking from a talk page to the corresponding article. It does not display the article name, but infers it from the talk page it is used on. {{tlc|Article link|Section}} expands to {{tlc|Section link|2=1={<nowiki/>{[[Help:Magic_words#Variables|ARTICLEPAGENAME]]}<nowiki/>}|3=2=Section|4=nopage=y}} and renders as {{Article link|Section}}. | |
− | This is a special-purpose variant of {{tlx|Section link}} for linking from a talk page to the corresponding article. It does not display the article name, but infers it from the talk page it is used on. {{tlc|Article link|Section}} expands to {{tlc|Section link|{<nowiki/>{[[Help:Magic_words#Variables|ARTICLEPAGENAME]]}<nowiki/>}|3= | ||
− | It may also be accessed vis the shortcut {{tlx|alink}}. It supports multiple sections (up to 8), just like {{ | + | It may also be accessed vis the shortcut {{tlx|alink}}. It supports multiple sections (up to 8), just like {{Section link}}, e.g. {{tlc|Alink|One|Two|Three|Four|Five}} → {{Alink|One|Two|Three|Four|Five}}. |
This is useful for creating a clickable link to a particular section in an article as part of talk page discussions. | This is useful for creating a clickable link to a particular section in an article as part of talk page discussions. | ||
+ | |||
+ | It may also be used within an article. {{tlc|slink||Section}} may be replaced by {{tlc|alink|Section}}, saving one <code>{{!}}</code> symbol. | ||
==TemplateData== | ==TemplateData== | ||
Line 13: | Line 14: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
− | "description": "This template is used to generate a link from a talk page to a certain section of the corresponding article, | + | "description": "This template is used to generate a link from a talk page to a certain section of the corresponding article, rendered with an appropriate section mark (§). This template may generate consecutive links to several sections of the same page.", |
"params": { | "params": { | ||
"1": { | "1": { | ||
Line 39: | Line 40: | ||
} | } | ||
</templatedata> | </templatedata> | ||
− | }}</noinclude> | + | }} |
+ | |||
+ | </noinclude> |
Latest revision as of 14:40, 28 October 2020
Script error: No such module "Section link".

This is a special-purpose variant of {{Section link}}
for linking from a talk page to the corresponding article. It does not display the article name, but infers it from the talk page it is used on. {{Article link|Section}}
expands to {{Section link|1={{ARTICLEPAGENAME}}|2=Section|nopage=y}}
and renders as Script error: No such module "Section link"..
It may also be accessed vis the shortcut {{alink}}
. It supports multiple sections (up to 8), just like Script error: No such module "Section link"., e.g. {{Alink|One|Two|Three|Four|Five}}
→ Script error: No such module "Section link"..
This is useful for creating a clickable link to a particular section in an article as part of talk page discussions.
It may also be used within an article. {{slink||Section}}
may be replaced by {{alink|Section}}
, saving one |
symbol.
TemplateData
TemplateData for Article link
This template is used to generate a link from a talk page to a certain section of the corresponding article, rendered with an appropriate section mark (§). This template may generate consecutive links to several sections of the same page.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Section name 1 | 1 | Name of the (first) section to which the link must be created. This parameter is mandatory. | String | required |
Section name 2 | 2 | This template can link to additional sections within one page. You may supply another section name in this field. | String | optional |
Section name 3 | 3 | This template can link to additional sections within one page. You may supply another section name in this field. | String | optional |
Section name 4 | 4 | This template can link to additional sections within one page. You may supply another section name in this field. | String | optional |
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |