Template:Section link

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Template:Section link § Notes

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Section link/doc.

No description yet available.

Usage

{{Section link |1= |2= }}

Template parameters

<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Page name1

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 namesuggested
Section name 12

Name of the (first) section to which the link must be created. This parameter is mandatory.

Stringrequired
Section name 23

This template can link to additional sections within one page. You can supply another section name in this field.

Stringoptional
Section name 34

This template can link to additional sections within one page. You can supply another section name in this field.

Stringoptional
Section name 45

This template can link to additional sections within one page. You can supply another section name in this field.

Stringoptional
Displayed Page Namedisplay

If the page name must be displayed differently (e.g. in italics), enter it here.

Lineoptional
Keep Underscores?keep-underscores

If set to a truthy value, doesn't replace underscores with spaces in the page name and section names.

Default
0
Auto value
1
Booleanoptional
Hide Page Name?nopage

If set to a truthy value, hides the page name (only section names are displayed).

Default
0
Auto value
1
Booleanoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users