More actions
m Rewrite doc. |
m Fix typo. |
||
| (One intermediate revision by the same user not shown) | |||
| Line 4: | Line 4: | ||
; Syntax | ; Syntax | ||
: {{T|Section link|article|section}} | : {{T|Section link|article|section}} | ||
:; | :; article : Name of the article to be linked to. For usage within the same article, leave the article position empty | ||
:; | :; section : Name of the section to be linked to. | ||
; Sample | ; Sample | ||
| Line 15: | Line 15: | ||
: {{section link|Gas cloud harvesting|Mykoserocin}} | : {{section link|Gas cloud harvesting|Mykoserocin}} | ||
===Suppressing page name=== | === Suppressing page name === | ||
Sometimes the page name needs not to appear, e.g. to avoid redundancy and wordiness. For the page on which the template is used, not specifying a page name creates a section link only. The following: | Sometimes the page name needs not to appear, e.g. to avoid redundancy and wordiness. For the page on which the template is used, not specifying a page name creates a section link only. The following: | ||
: {{Code|<nowiki>{{Section link||Suppressing page name}}</nowiki>}} | : {{Code|<nowiki>{{Section link||Suppressing page name}}</nowiki>}} | ||
: ...is the equivalent of: | : ...is the equivalent of: | ||
: {{Code|<nowiki>[[#Suppressing page name| | : {{Code|<nowiki>[[#Suppressing page name|Suppressing page name]]</nowiki>}} | ||
: ...and renders as: | : ...and renders as: | ||
: {{section link||Suppressing page name}} | : {{section link||Suppressing page name}} | ||
<includeonly>[[Category:Link templates]]</includeonly> | <includeonly>[[Category:Link templates]]</includeonly> | ||
<noinclude>[[Category:Template documentation]]</noinclude> | <noinclude>[[Category:Template documentation]]</noinclude> | ||