Help:Subpages/cs

Podstránky zavádějí hierarchickou organizaci na wiki stránkách, s úrovněmi hierarchie oddělenými lomítky.

Kde to funguje
Ve výchozím nastavení je funkce podstránky MediaWiki vypnuta v hlavním jmenném prostoru, ale lze ji použít na diskuzních stránkách a uživatelských stránkách. Popis jmenných prostorů a $wgNamespacesWithSubpages najdete v Nápověda: Jmenné stránky, kde se dozvíte, jak změnit toto výchozí chování. V oboru názvů, kde je funkce vypnuta, jsou všechna lomítka v názvu stránky jednoduše součástí názvu stránky a neudělají nic zvláštního.

Pokud jsou v oboru názvů povoleny podstránky, lomítko v názvu stránky vždy způsobí, že stránka bude podstránkou. Pokud to není žádoucí, můžete udělat bypass podstránky pomocí alternativních znaků.

Jak to funguje
Lomítko (slashes /) v názvu stránky rozdělí stránku na nadřazenou a podstránky, rekurzivně, např .:


 * Help:Subpages – this page
 * Help:Subpages/subpage – child page
 * Help:Subpages/subpage/sub-subpage – grandchild page
 * Help:Subpages/subpage/sub-subpage/sub-sub-subpage – great grandchild page
 * Help:Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage – great great grandchild page

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  and , and the parser function   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).

Využití podstránek
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
 * to create a template's subpages for its documentation, for its code sandbox, for its testcases, and for any subtemplate code

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.

Zobrazování podstránek
Subpages can be listed very plainly by transcluding Special:PrefixIndex, like this:

Which produces this:

Since the magic word  outputs the current page, the general wiki markup to show all subpages of the current page is. You can pass parameters to this, e.g.

The subpage extensions, such as Extension:SubPageList, let you customize the display of subpages.

Bypass subpages using alternative characters
As a consequence of the forward slash being a reserved character when subpages are enabled, an alternative character might be needed. Back slashes are treated as normal characters in subpage naming and can be used in place of forward slashes. Additionally, as a crude hack, a character similar to the forward 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 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. The risk is that the visual similarity might make this go unnoticed by human editors.

Viz též

 * m:Help:Link#Subpage feature
 * Special:PrefixIndex — Provides a list of subpages.
 * Special:PrefixIndex — Provides a list of subpages.
 * Special:PrefixIndex — Provides a list of subpages.