Subpages: Difference between revisions
create new feature page |
Add the property settings that fill out the Features page. |
||
Line 4: | Line 4: | ||
|title=nested pages are like nesting dolls | |title=nested pages are like nesting dolls | ||
}} | }} | ||
{{#set:feature description = Subpages are turned on for this wiki. }} | |||
{{#set:feature notes = Subpages can be a good way to expand a topic on a tangent without creating super long page names. Use [[Category]] tagging if you just want to broadly organize pages by their subject.}} | |||
{{#set:feature tests = The [[MediaWiki]] page has many subpages }} | |||
{{#set:feature examples = [[Git]] has a popular subpage [[Git/hacks]] }} | |||
{{Help:Subpages}} | {{Help:Subpages}} |
Revision as of 14:57, 4 September 2025
Subpages | |
---|---|
![]() | |
Image shows: | The bottom of the first matryoshka |
Summary | |
Title: | nested pages are like nesting dolls |
Description: | Subpages are turned on for this wiki. |
More | |
Notes: | Subpages can be a good way to expand a topic on a tangent without creating super long page names. Use Category tagging if you just want to broadly organize pages by their subject. |
Test: | The MediaWiki page has many subpages |
Example: | Git has a popular subpage Git/hacks |
Subpages introduce some hierarchical organisation into wiki page names, with levels of the hierarchy separated by slashes '/'.
Where it works
MediaWiki's subpage feature is turned off by default in the main namespace, but can be used on talk pages and user pages. See Help:namespaces. 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. This wiki allows subpages in the main article namespace.
How it works
Slashes (/) within a page name break the page into parent and subpages, recursively, eg:
You can link directly to any page’s subpage using the normal double square brackets notation, by providing the full name – including the slash(es) and the individual subpage name(s). You can also link from one page to one of its own subpages using certain shortcuts, which are covered at Help:Links.
There are Magic words to split the name of a subpage, such as {{BASEPAGENAME}}
and {{SUBPAGENAME}}
, and the parser function {{#titleparts:}}
for finer control.
Note that the part of page names after a slash is case sensitive including the first letter.
Breadcrumb links will appear automatically at the top of the subpage, linking to each parent page that exists. These links do not appear, however, if the parent pages have not yet been created or if the subpage feature is turned off.
As these automatic breadcrumb links are not in the page content, the breadcrumbs do not place parent pages in the What links here and Related changes lists.
If you move (rename) a parent page, you will be shown a list of the subpages, and users with the move-subpages user right will have the option to automatically move subpages (up to 100).
Using (and over-using) sub pages
There are various uses for the subpage feature. The main two intended uses are:
- On a talk page create a subpage (or several) for an archiving of old discussions
- On a user page create a subpage (or several) to use as a scratchpad editing space.
People instinctively think hierarchically when trying to organize information, so it may be tempting to use subpages all the time. However, subpages can be over-used. Remember that having a page name with a slash will generally make the name longer, harder to remember, and thus more difficult to link to. Some people find it more elegant to keep page naming simple. By sticking to a flat naming structure, with a manually maintained web of wiki links, a structure will emerge organically (and this can include a pseudo-hierarchy). You can also organize pages with the category feature, which is more suitable for creating a hierarchical network of information.
![]() |
Tip for wiki admins: Subpages can be activated within the 'main' namespace by adding to the $wgNamespacesWithSubpages array. |
Displaying Subpages
Subpages can be listed very plainly by transcluding Special:PrefixIndex, like this:
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}
Using SubPageList
This wiki includes the SubPageList extension, so you can display subpages as easy as:
{{#subpages:}}
Because the syntax might be more than you want to remember, we created a template named Subpages that invokes the parser function and adds a heading above it.
Other Dynamic Page Listings
This wiki includes the mw:Extension:DynamicPageList3 extension. So, if you want to display a list of pages on some other criteria such as category membership, author, template usage, etc., use that functionality instead.
See also
⧼tpt-languages-legend/Subpages⧽ | English |
---|