Template:Section link: Difference between revisions

From Test Wiki
Jump to navigation Jump to search
Prohibiting substitution of template and wrapping usable content in <includeonly></includeonly> tags to prevent breakage
m Protected "Template:Section link" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) [Delete=Allow only administrators] (indefinite) [Protect=Allow only administrators] (indefinite))
 
(No difference)

Latest revision as of 14:16, 18 February 2026

Template documentation

This template, {{section link}}, or its shortcut, {{slink}}, is used to generate a link to a certain section(s) of a local wiki page and render an appropriate section mark (§ or §§).

For example, instead of:

[[Albert Einstein#Scientific career]]


...you can write:

{{section link|Albert Einstein|Scientific career}}

...or

{{section link|Albert Einstein#Scientific career}}


TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Section link in articles based on its TemplateData.

TemplateData for Section link

<templatedata> { "description": "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.", "params": { "1": { "label": "Page name", "description": "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.", "type": "wiki-page-name", "required": true }, "2": { "label": "Section name 1", "description": "Name of the (first) section to which the link must be created. This parameter is mandatory.", "type": "string", "suggested": true }, "3": { "label": "Section name 2", "description": "This template can link to additional sections within one page. You can supply another section name in this field.", "type": "string" }, "4": { "label": "Section name 3", "description": "This template can link to additional sections within one page. You can supply another section name in this field.", "type": "string" }, "5": { "label": "Section name 4", "description": "This template can link to additional sections within one page. You can supply another section name in this field.", "type": "string" }, "nopage": { "label": "Hide page name", "description": "If set to \"yes\", \"y\" or \"true\", hides the page name (only section names are displayed).", "type": "boolean" }, "keep-underscores": { "label": "Keep underscores", "description": "If set to \"yes\", \"y\" or \"true\", doesn't replace underscores with spaces in the page name and section names.", "type": "boolean" }, "display": { "label": "Displayed page name", "description": "If the page name must be displayed differently (e.g. in italics), enter it here.", "type": "string" }, "permalink": { "label": "Permanent link", "description": "Revision ID, for a permanent link to the section (only works with one section link)", "type": "number" } } } </templatedata>

See also