Help:Subpages

From Celeste Wiki
Jump to navigation Jump to search

<languages/> Template:PD Help Page <translate> Subpages introduce some hierarchical organization into wiki pages, with levels of the hierarchy separated by slashes (<tvar|slash>/</>).

Where it works[edit source]

</translate> <translate> By default, MediaWiki's subpage feature is turned off in the main namespace, but can be used on [[<tvar|help-talkpages>Special:MyLanguage/Help:Talk pages</>|talk pages]] and [[<tvar|help-userpages>Special:MyLanguage/Help:User page</>|user pages]].</translate> <translate> See [[<tvar|help-ns>Special:MyLanguage/Help:Namespaces</>|Help:Namespaces]] for description of namespaces and <tvar|man-wg-ns-with-sp>$wgNamespacesWithSubpages</> to learn how to modify this default behavior.</translate> <translate> In namespaces where the feature is switched off, any forward slashes (<tvar|slash2>/</>) within a page name are simply part of the page name and do nothing special.</translate>

<translate> When subpages are enabled in a namespace, a forward slash in the title of a page always causes the page to be a subpage. If this is not desired, you can [[<tvar|1>#Bypass subpages using alternative characters</>|#Bypass subpages using alternative characters]].

How it works[edit source]

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

</translate>

<translate> 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).</translate> <translate> You can also link from one page to one of its own subpages using certain shortcuts, which are covered at [[<tvar|help-links-int>Special:MyLanguage/Help:Links#Internal</>|Help:Links]].</translate>

<translate> 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 [[<tvar|rights>Special:MyLanguage/Help:User rights</>|user right]] will have the option to automatically move subpages (up to 100).

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 [[<tvar|help-talkpages2>Special:MyLanguage/Help:Talk pages</>|talk page]]
  • to create scratchpad editing spaces under a [[<tvar|help-userpages2>Special:MyLanguage/Help:User page</>|user page]]
  • to create other-language versions of a document in multilingual wikis</translate>

<translate>

  • to create a template's subpages for its documentation, for its code sandbox, for its testcases, and for any subtemplate code

</translate>

<translate> Subpages are useful for organising information hierarchically.</translate> <translate> 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.</translate> <translate> You can also organize pages with the [[<tvar|help-cat>Special:MyLanguage/Help:Category</>|category]] feature, which is more suitable for creating a hierarchical network of information.</translate>

<translate>

Displaying subpages[edit source]

Subpages can be listed very plainly by transcluding Special:PrefixIndex, like this: </translate>

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

<translate> Which produces this: </translate>

<translate> Since the [[<tvar|help-magicwords>Special:MyLanguage/Help:Magic words</>|magic word]] <tvar|fullpagename>{{FULLPAGENAME}}</> outputs the current page, the general wiki markup to show all subpages of the current page is <tvar|all-subpages>{{Special:PrefixIndex/{{FULLPAGENAME}}/}}</>.</translate> <translate> You can pass parameters to this, e.g. {{Special:PrefixIndex/{{FULLPAGENAME}}/ |hideredirects=1 |stripprefix=1}}</translate>

<translate> The [[<tvar|1>Special:MyLanguage/Category:Subpage extensions</>|subpage extensions]], such as <tvar|2>Template:Ll</>, let you customize the display of subpages. </translate>

<translate>

Bypass subpages using alternative characters[edit source]

</translate> <translate> As a consequence of the forward slash being a reserved character when subpages are enabled, an alternative character might be needed.</translate> <translate> Back slashes (<tvar|backslash>\</>) are treated as normal characters in subpage naming and can be used in place of forward slashes.</translate> <translate> Additionally, as a crude hack, a character similar to the forward slash can be used instead, such as the "big solidus" (<tvar|u1>U+29F8</>), which results in Foo⧸bar (cf. a real slash: Foo/bar), or the solidus (<tvar|u2>U+2044</>), which results in Foo⁄bar.</translate> <translate> Three possible technical disadvantages (apart from the visual difference from a real slash) arise from this hack:</translate>

  1. <translate> People without the necessary fonts won’t be able to view the character properly;</translate>
  2. <translate> Redirects from the title with a slash must be created, so that linking and search will work correctly.</translate>
  3. <translate> Both the [[<tvar|man-ns>Special:MyLanguage/Manual:Namespace#Subject-and-talk</>|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).</translate> <translate> For example, subpages are disabled in the main namespace in Wikipedia, so while the talk page won't work unless the solidus character is used to prevent having them marked as subpages, the corresponding page in the main namespace could accidentally keep an actual slash.</translate> <translate> The risk is that the visual similarity might make this go unnoticed by human editors.</translate>

<translate>

See also[edit source]

</translate>

[[Category:Help{{#translation:}}|Subpages]] [[Category:Subpage{{#translation:}}|Subpages]]