Template:Subpage/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
m Move to documentation subpage
ArrowHead294 (talk | contribs)
mNo edit summary
 
Line 10: Line 10:
:* <code>uprev</code> capitalises the first letter of the first argument for the section name and links to a different subpage on the ''parent'' page.
:* <code>uprev</code> capitalises the first letter of the first argument for the section name and links to a different subpage on the ''parent'' page.
:* <code>lprev</code> makes the first letter of the first argument lowercase.
:* <code>lprev</code> makes the first letter of the first argument lowercase.
:* <code>u</code> links to a subpage on the ''current'' page and capitalises the first letter of the argument.
:* <code>u</code> links to a subpage on the ''current'' page and capitalises the first letter of the argument. '''This is the default behaviour.'''
:* <code>l</code> does the same thing as <code>u</code>, but makes the first letter lowercase instead of uppercase.
:* <code>l</code> does the same thing as <code>u</code>, but makes the first letter lowercase instead of uppercase.
:* <code>prev</code> will link to the parent page (if it exists) will be linked.
:* <code>prev</code> will link to the parent page (if it exists) will be linked.

Latest revision as of 13:21, 4 June 2025

This template provides a link to a page's subpages without having to manually type out the name of the page each time. To prevent slashes that do not indicate subpages from being misinterpreted as subpage separators, MediaWiki's automatic subpage feature is disabled by default in the main (article) namespace, and on the Xenharmonic Wiki slashes frequently appear in page titles, such as 3/2.

Usage

{{{1}}}
The first unnamed parameter will be interpreted as the name of the subpage to link to. Without a second parameter, this assumes you are linking from the parent page.
prev, lprev, uprev
On subpages themselves, you can pass in any of these keywords as a second unnamed parameter:
  • uprev capitalises the first letter of the first argument for the section name and links to a different subpage on the parent page.
  • lprev makes the first letter of the first argument lowercase.
  • u links to a subpage on the current page and capitalises the first letter of the argument. This is the default behaviour.
  • l does the same thing as u, but makes the first letter lowercase instead of uppercase.
  • prev will link to the parent page (if it exists) will be linked.
s
Pass s= followed by the name of a section if you want to link to a section within the page.
text
Pass in text= to change the text displayed in the subpage link. If this parameter is not specified, the text displayed will default to the section name and then to the first unnamed parameter.

See also

  • {{breadcrumb}} – used for controlling subpages in the main (article) namespace.