Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Section link/doc: Difference between revisions

Template page
create documentation for Template:Section link
 
update the parameters to reflect and give example of use case for the "display name" parameter
 
Line 2: Line 2:


== Useage ==
== Useage ==
  <nowiki>{{Section link|1}}</nowiki>
  <nowiki>{{Section link|1|2}}</nowiki>


  <nowiki>{{Section link|section}}</nowiki>
  <nowiki>{{Section link|section|display name}}</nowiki>
=== Examples ===
=== Examples ===
  <nowiki>{{Section link|Parameters}}</nowiki>
  <nowiki>{{Section link|Parameters}}</nowiki>
produces
produces<br><br>
{{Section link|Parameters}}
{{Section link|Parameters}}
----
<nowiki>{{Section link|Parameters|Epic parameters ...}}</nowiki>
produces<br><br>{{Section link|Parameters|Epic parameters ...}}


== Parameters ==
== Parameters ==
Line 14: Line 21:
{
{
"params": {
"params": {
"section": {
"1": {
"label": "section",
"label": "section",
"description": "The section of the article you want to link to. The subsection should be entered with the correct case (matching the header of the section you are linking) as well as spacing, punctuation, etc."
"description": "The section of the article you want to link to. The subsection should be entered with the correct case (matching the header of the section you are linking) as well as spacing, punctuation, etc.",
"required": true,
"type": "content"
},
"2": {
"label": "display name",
"description": "The (optional) display name of a link. This parameter should only be used when the section you are linking to is greater than 20-30 characters to reduce the size of the link. Utilize ellipsis (...) when shortening the link.",
"type": "content"
}
}
}
},
"format": "inline"
}
}
</templatedata>
</templatedata>

Latest revision as of 01:34, 25 November 2024

The {{Section link}} template is used to link to a section within an article, the section link should be avoided to link cross-article as it can be confusing for some users to be navigated to the middle of an external webpage.

Useage

{{Section link|1|2}}
{{Section link|section|display name}}

Examples

{{Section link|Parameters}}

produces

§ Parameters




{{Section link|Parameters|Epic parameters ...}}

produces

§ Epic parameters ...

Parameters

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
section1

The section of the article you want to link to. The subsection should be entered with the correct case (matching the header of the section you are linking) as well as spacing, punctuation, etc.

Contentrequired
display name2

The (optional) display name of a link. This parameter should only be used when the section you are linking to is greater than 20-30 characters to reduce the size of the link. Utilize ellipsis (...) when shortening the link.

Contentoptional