Template:Section link/doc
Usage
editThis template is appropriate for use to create any page sections, or to reference sections within the same page, and gives more typical view.
Syntax (overview)
edit{{section link|Article|Section}}
or{{section link|Article#Section}}
, link to section of other article. → Example: France § Cities{{section link|Article|Section|nopage=y}}
, link to section of other article, only displaying the section's title → Example: § Cities{{section link||Section}}
, for usage within the same page, supply an empty first parameter → Example: § Cities
Single section
editThis template, {{section link}}, or its shortcut, {{slink}}, is used to generate a link to a certain section of a local wiki page and render an appropriate section mark (§).
Instead of:
[[France#Cities]]
...you can write:
{{section link|France|Cities}}
...or
{{section link|France#Cities}}
Multiple sections
editThis template may generate consecutive links to several sections of the same page. You can write:
{{section link|At the airport|Get in|Get around|Check-in}}
- At the airport §§ Get in, Get around, and Check-in
...or:
{{section link|At the airport#Get in|Get around|Check-in}}
- At the airport §§ Get in, Get around, and Check-in
Suppressing page name
editSometimes 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:
{{Section link||Suppressing page name}}
...is the equivalent of:
[[#Suppressing page name|§ Suppressing page name]]
...and renders as:
For other pages, |nopage=y
can be used to suppress the page name. This can be used when the page name is clear from context, such as on talk pages referring to the article being discussed.
Underscores
editIt is a practice to copy article and section name from the browser's address bar. When doing that, the article and section names may contain underscores:
Puerto_Rico#Other_destinations
This template automatically replaces the underscores with space characters:
{{section link|Puerto_Rico#Other_destinations}}
→ Puerto Rico § Other destinations
To retain the underscores in the rendered output, use |keep-underscores=yes