Template:Section link
Sarna News

- VoidBreaker Review - How Clan Sea Fox Ended the Dark Age
- Bad 'Mechs - Thresher Mk II
- HEXTECH Wave 9 Review - Winding Rivers, Tall Walls, and Underground Tunnels
- Hired Steel and Making MechWarrior 5: Clans Cinematics with Constantin & Bernhard of TMC
- Your BattleTech News Round-Up For December, 2024
- Read more →
This template uses Lua: |
Contents
Usage[edit]
This template is appropriate for use in hatnotes and See also sections, or to reference sections within the same article. When using in article body text, consider whether an overt link to a specific section in another article may be confusing to readers who cannot follow links, such as those viewing a printed version of the material, or a version republished without links.
Syntax (overview)[edit]
{{section link|Article|Section}}
or{{section link|Article#Section}}
, link to section of other article. → Example: Help:Line break handling § Non-breaking space{{section link|Article|Section|nopage=y}}
, link to section of other article, only displaying the section's title → Example: § Non-breaking space{{section link||Section}}
, for usage within the same page, supply an empty first parameter → Example: § Non-breaking space
Single section[edit]
This 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:
[[Help:Line break handling#Preventing and controlling word wraps]]
Help:Line break handling#Preventing and controlling word wraps
...you can write:
{{section link|Help:Line break handling|Preventing and controlling word wraps}}
Help:Line break handling § Preventing and controlling word wraps
...or
{{section link|Help:Line break handling#Preventing and controlling word wraps}}
Help:Line break handling § Preventing and controlling word wraps
Multiple sections[edit]
This template may generate consecutive links to several sections of the same page. You can write:
{{section link|Help:Line break handling|Causing line breaks|Preventing and controlling word wraps}}
- Help:Line break handling §§ Causing line breaks and Preventing and controlling word wraps
Suppressing page name[edit]
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:
{{Section link||Suppressing page name}}
...is the equivalent of:
[[#Suppressing page name|§ Suppressing page name]]
...and renders as:
Use |nopage=y
for the same visual effect.
When discussing an article from its talk page, {{Article link}}
—or its alias, {{alink}}
—is preferable to the longer {{Section link|{{ARTICLEPAGENAME}}|Section|nopage=y}}
.
Comparison of displayed results:
{{section link|Help:Line break handling|Preventing and controlling word wraps}}
→ Help:Line break handling § Preventing and controlling word wraps{{section link|Help:Line break handling|Preventing and controlling word wraps|nopage=y}}
→ § Preventing and controlling word wraps{{section link|Help:Line break handling|Preventing and controlling word wraps|Non-breaking space}}
→ Help:Line break handling §§ Preventing and controlling word wraps and Non-breaking space{{section link|Help:Line break handling|Preventing and controlling word wraps|Non-breaking space|nopage=y}}
→ §§ Preventing and controlling word wraps and Non-breaking space
TemplateData[edit]
This template is used to generate a link to a certain section of a local wiki page and render an appropriate section mark (§). This template may generate consecutive links to several sections of the same page.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Page name | 1 | Name of the page to which the link must be created. Leave empty to link to the current page. Doing so causes no page name to appear. | Page | suggested |
Section name 1 | 2 | Name of the (first) section to which the link must be created. This parameter is mandatory. | String | required |
Section name 2 | 3 | This template can link to additional sections within one page. You can supply another section name in this field. | String | optional |
Section name 3 | 4 | This template can link to additional sections within one page. You can supply another section name in this field. | String | optional |
Section name 4 | 5 | This template can link to additional sections within one page. You can supply another section name in this field. | String | optional |
Hide page name | nopage | If set to "yes", "y" or "true", hides the page name (only section names are displayed). | Boolean | optional |
Keep underscores | keep-underscores | If set to "yes", "y" or "true", doesn't replace underscores with spaces in the page name and section names. | Boolean | optional |
Displayed page name | display | If the page name must be displayed differently (e.g. in italics), enter it here. | String | optional |
See also[edit]
- U+00A7 § SECTION SIGN
- {{Anchor}}
- {{Article link}} – for linking to a mainspace section from its talk page
- {{Multi-section link}} – for linking to a section listing nested section names
- {{Pslink}} – for linking to a section without displaying the section sign (§)