Template:Subpages/doc

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages. As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.

The {{Subpages}} template shows all the subpages of a given page. It should not be used in the main namespace, only on pages such as user or Gentoo project pages. It takes one, optional parameter, the target page name. The default parameter is evaluated to the {{PAGENAME}} magic word value when no anonymous or first argument is passed.

  • {{subpages}}: shows the subpages for the current page (in this case, Template:Subpages).
  • {{subpages|User:Larry}}: shows the subpages under the User:Larry page.

Alternatively, subpages can be embedded the Special:PrefixIndex directly, e.g.

{{Special:Prefixindex|prefix=User:Example/|hideredirects=1|stripprefix=1}}

Parameters

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Page1

Page to display links underneath if not current page

Example
User:Larry
Pageoptional

Usage

See the template's testcases:


Call template directly with no parameters (no 1= or anonymous)
Wiki code {{Subpages}}

Main version


Sandbox version


Specified page using anonymous parameter
Wiki code {{Subpages|Project:Wiki}}

Main version


Sandbox version
1= parameter
Wiki code {{Subpages|1=Project:Wiki}}

Main version


Sandbox version
Specified page using 1= parameter
Wiki code {{Subpages|1=Project:Wiki}}

Main version


Sandbox version