Lifestyle
 

Help:Subpages

From Familypedia

A subpage is a page with a title in the form Foo/Bar, such as UserWMWillis/Templates. Each one has at the top an automatic link back to the "root" page.

See w:Help:Subpages for much more detail.

Contents

An example of a subpage linking to its parent page.

A subpage is a page with a title in the form "Foo/Bar".

Titles like this can always be made, but only for namespaces where the MediaWiki subpage feature is enabled will the following work:

  • "Foo/Bar" can be linked from "Foo" with simply [[/Bar]] .
    • [[/Bar/]] will display as "Bar".
    • Note that if "Foo" is moved to "Foo2" (or any other title), the link [[/Bar]] will then point to "Foo2/Bar" but the subpage will not move automatically, so it will leave a broken link.
  • The subpage will automatically provide a back-link to its parent page, if the parent page exists.

Like normal titles, subpage titles are case sensitive, so Foo/Bar and Foo/bar are different pages.

How do use subpages?

Different wikis may have different policies on when subpages may or may not be used.

A common use is to allowe users to make subpages in their userspace, such as a personal sandbox at [[User:Yourname/sandbox]].

Archives of talk pages are often subpages of the main talk page. For example, [[Talk:Main Page/Archive 1]].

Can I get a list all subpages of a parent page?

You can find the subpages of a specific page by entering the title followed by a forward slash at Special:Allpages on the relevant wiki.

You can also use Special:PrefixIndex to do this. You can even make links like Special:PrefixIndex/Help:Customizing Monaco

(note: This is also show the parent page in the list, if you don't want this, and only want subpages, add a / at the end of the link, like Special:PrefixIndex/Help:Customizing Monaco/)

Why do some people not like subpages?

Note that Wikipedia does not allow subpages in the main article namespace. A case against subpages was made early in the project, and it is generally regarded as easier to link to pages with real titles than to subpages. Therefore, MediaWiki by default only recognizes subpages for talk pages and user pages.

Wikia however has globally enabled subpages on all core namespaces (0-15). If you feel the subpages detrimental to your Wikia's main namespace, please request that the subpage feature be switched off.

By default, any Custom namespaces that are setup do NOT have subpages on by default, You need ask for this during your namespace request.

Can I hide the backlinks to parent pages?

If you find the most prominent aspect of subpages (the parent backlink) to be an annoyance on your Wikia, you can hide it via CSS (add to MediaWiki:Common.css):

body.ns-0 #contentSub .subpages { display:none; }

You can also disable it for other namespaces by changing the ns-# number to the appropriate number (view a page source to find the number of a namespace).

How can I refer to subpages in templates and parserfunctions?

  • The parent and subpage can be referred to via the {{SUBPAGENAME}} and {{BASEPAGENAME}} magic words (more). This can be useful for templates and parserfunctions.
  • If a parent page exists, the #contentSub div will have an extra span in class="subpages". This can be styled via #contentSub .subpages {}.

See also

Facts about SubpagesRDF feed