Help:Podstrony
Uwaga: Jeżeli edytujesz tę stronę, to umieszczając na niej treści wyrażasz nieodwołalną zgodę na udostępnianie Twojego materiału na podstawie wolnej licencji CC0. Aby uzyskać więcej informacji, przeczytaj Strony Pomocy w Domenie Publicznej. |
Podstrony służą do wprowadzania pewnego rodzaju hierarchicznej organizacji stron wiki, z poziomami hierarchii oddzielonymi ukośnikami (/
).
Gdzie to działa
Domyślnie, funkcja podstron MediaWiki jest wyłączona w głównej przestrzeni nazw, ale może być wykorzystywana na stronach dyskusji oraz stronach użytkowników.
Zobacz Help:Przestrzenie nazw po opis przestrzeni nazw oraz $wgNamespacesWithSubpages, aby dowiedzieć się jak zmieniać to zachowanie.
W przestrzeniach nazw, gdzie ta funkcja jest wyłączona, wszystkie ukośniki (/
) w nazwie strony są po prostu jej częścią i nie robią nic szczególnego.
Gdy podstrony są włączone dla danej przestrzeni nazw, ukośnik w tytule strony, zawsze spowoduje uznanie strony za podstronę, nawet gdy to nie jest celowe lub wskazane.
Jak to działa
Slashes (/) within a page name break the page into parent and subpages, recursively, e.g.:
- Help:Subpages – ta strona
- Help:Subpages/subpage – strona podrzędna
- Help:Subpages/subpage/sub-subpage – strona podrzędna strony podrzędnej
- Help:Subpages/subpage/sub-subpage/sub-sub-subpage – strona podrzędna strony podrzędnej strony podrzędnej
- Help:Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage – strona podrzędna strony podrzędnej strony podrzędnej strony podrzędnej
Help:Subpages | /sub | /sub/subi | /sub/sub1/sub | /sub/sub1/sub/sub |
---|---|---|---|---|
BIEŻĄCA STRONA | child | grandchild | great grandchild | great great grandchild |
parent | BIEŻĄCA STRONA | child 1 | grandchild | great grandchild |
child 2 | grandchild | great grandchild | ||
grandparent | parent | BIEŻĄCA STRONA | child | grandchild |
great grandparent | grandparent | parent | BIEŻĄCA STRONA | child |
great great grandparent | great grandparent | grand-parent | parent | BIEŻĄCA STRONA |
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).
Wykorzystywanie podstron
Istnieje kilka możliwości wykorzystania funkcji podstron. Niektóre z typowych zastosowań to:
- tworzenie archiwów starszych dyskusji na stronach dyskusji
- tworzenie brudnopisów pod stronami użytkowników
- stworzenie innych wersji językowych dokumentu na wielojęzycznych wiki
- do stworzenia podstron szablonu do jego dokumentacji, piaskownicy kodu, testowania użycia i innego kodu składowego szablonu
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.
Wyświetlanie podstron
Subpages can be listed very plainly by transcluding Special:PrefixIndex, like this:
{{Special:PrefixIndex/Help:Subpages/}}
Which produces this:
- Subpages/ca
- Subpages/cs
- Subpages/de
- Subpages/diq
- Subpages/en
- Subpages/es
- Subpages/fa
- Subpages/fr
- Subpages/id
- Subpages/it
- Subpages/ja
- Subpages/ko
- Subpages/nb
- Subpages/nl
- Subpages/pl
- Subpages/ps
- Subpages/pt
- Subpages/pt-br
- Subpages/ru
- Subpages/sd
- Subpages/sk
- Subpages/subpage
- Subpages/subpage/ar
- Subpages/subpage/de
- Subpages/subpage/en
- Subpages/subpage/fa
- Subpages/subpage/fr
- Subpages/subpage/id
- Subpages/subpage/ja
- Subpages/subpage/lt
- Subpages/subpage/pl
- Subpages/subpage/pt
- Subpages/subpage/pt-br
- Subpages/subpage/sub-subpage
- Subpages/subpage/sub-subpage/de
- Subpages/subpage/sub-subpage/en
- Subpages/subpage/sub-subpage/fr
- Subpages/subpage/sub-subpage/id
- Subpages/subpage/sub-subpage/ja
- Subpages/subpage/sub-subpage/pl
- Subpages/subpage/sub-subpage/pt
- Subpages/subpage/sub-subpage/pt-br
- Subpages/subpage/sub-subpage/sub-sub-subpage
- Subpages/subpage/sub-subpage/sub-sub-subpage/de
- Subpages/subpage/sub-subpage/sub-sub-subpage/en
- Subpages/subpage/sub-subpage/sub-sub-subpage/fr
- Subpages/subpage/sub-subpage/sub-sub-subpage/id
- Subpages/subpage/sub-subpage/sub-sub-subpage/ja
- Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage
- Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage/de
- Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage/en
- Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage/es
- Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage/fr
- Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage/id
- Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage/ja
- Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage/sv
- Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage/uk
- Subpages/subpage/sub-subpage/sub-sub-subpage/sv
- Subpages/subpage/sub-subpage/sub-sub-subpage/uk
- Subpages/subpage/sub-subpage/sub-sub-subpage/with/slahes
- Subpages/subpage/sub-subpage/sub-sub-subpage/with/slahes/c
- Subpages/subpage/sub-subpage/sub-sub-subpage/with/some/slashes
- Subpages/subpage/sub-subpage/sub-sub-subpage/with/some/slashes/a
- Subpages/subpage/sub-subpage/sub-sub-subpage/with/some/slashes/b
- Subpages/subpage/sub-subpage/sv
- Subpages/subpage/sub-subpage/uk
- Subpages/subpage/sub-subpage/zh
- Subpages/subpage/sv
- Subpages/subpage/tr
- Subpages/subpage/uk
- Subpages/subpage/zh
- Subpages/subpage2
- Subpages/subpage2/sub-subpage
- Subpages/sv
- Subpages/tr
- Subpages/uk
- Subpages/vi
- Subpages/yo
- Subpages/zh
Since the magic word {{FULLPAGENAME}}
outputs the current page, the general wiki markup to show all subpages of the current page is {{Special:PrefixIndex/{{FULLPAGENAME}}/}}
.
You can pass parameters to this, e.g. {{Special:PrefixIndex/{{FULLPAGENAME}}/ |hideredirects=1 |stripprefix=1}}
The subpage extensions, such as Extension:SubPageList or Extension:SubpageNavigation , 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:
- People without the necessary fonts won’t be able to view the character properly;
- Redirects from the title with a slash must be created, so that linking and search will work correctly.
- 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.
Zobacz też
- Podręcznik:$wgNamespacesWithSubpages
- Help:Links#Subpage feature
- Help:Variables#Page-names
- Special:PrefixIndex — Provides a list of subpages.
- Category:Subpage extensions
- w:Subpages