Help:Subpages

From MediaWiki Beginners Wiki
Jump to: navigation, search
PD Important note: When you edit this page, you agree to release your contribution into the public domain. If you don't want this or can't do this due to license restrictions, please don't edit. This page is one of the Public Domain Help Pages, which can be freely copied into fresh wiki installations and/or distributed with MediaWiki software; see Help:Contents for an overview of all pages. See Project:PD help/Copying for instructions. PD

Subpages introduce some hierarchical organization into wiki pages, with levels of the hierarchy separated by slashes (/).

Where it works[edit source]

By default, MediaWiki's subpage feature is turned off in the main namespace, but can be used on talk pages and user pages. See Help:Namespaces for description of namespaces and Manual:$wgNamespacesWithSubpages#Enabling for a namespace to learn how to modify this default behaviour. In namespaces where the feature is switched off, any slashes (/) within a page name are simply part of the page name and do nothing special.

It's not possible to use slashes in the title of a page from a namespace where subpages are activated. However, as a crude hack, a character similar to the slash can be used instead, such as the "big solidus" (U+29F8), which results in Foo⧸bar (cf. a real slash: Foo/bar), or the solidus (U+2044), which results in Foo⁄bar. Three possible technical disadvantages (apart from the visual difference from a real slash) arise from this hack:

  1. People without the necessary fonts won't be able to view the character properly;
  2. Redirects from the title with a slash must be created, so that linking and search will work correctly.
  3. Both the subject and talk versions of a page (and their corresponding subpages, e.g. discussion archives) need to use the hack, so that moving a page would take all connected pages to the new title (if that setting is selected during the move). For example, subpages are disabled in the main namespace in Wikipedia, so while the talk page would need to use the solidus character to prevent having them marked as subpages, the corresponding page in the main namespace could keep an actual slash, is this goes unnoticed.

How it works[edit source]

Slashes (/) within a page name break the page into parent and subpages, recursively, e.g.:

Note that the part of page names after a slash is case sensitive including the first letter.

In subpages, a link back to antecedent pages will automatically appear at the top. These links do not appear, however, if the antecedent pages have not yet been created or if the subpage feature is turned off.

Use of subpages[edit source]

There are various uses for the subpage feature. Some of the typical usages of subpages are:

  • to create archives of old discussions under a talk page
  • to create scratchpad editing spaces under a user page
  • to create other language versions of a document in multilingual wikis

Subpages are useful for organising information hierarchically. On the other hand, subpages tend to have a long name that is hard to remember, so it may be more user-friendly to use them as little as possible. You can also organize pages with the category feature, which is more suitable for creating a hierarchical network of information.

Displaying subpages[edit source]

You can use any of the subpage extensions, like Extension:SubPageList, which features that allow you to customize the display. Or, subpages can also be listed very plainly without an extension by transcluding Special:PrefixIndex, like this:

{{Special:PrefixIndex/Help:Subpages/}}

Which produces this:

See also[edit source]

Language: English