Help:サブページ

From MediaWiki.org
Jump to: navigation, search
Other languages:
العربية 0% • ‎Zazaki 0% • ‎English 100% • ‎British English 13% • ‎español 0% • ‎français 0% • ‎Bahasa Indonesia 0% • ‎italiano 0% • ‎日本語 43% • ‎한국어 0% • ‎polski 26% • ‎português 0% • ‎português do Brasil 9% • ‎русский 57% • ‎slovenčina 0% • ‎中文 22%
PD 注意: このページを編集すると、編集内容が CC0 のもとで公開されることに同意したと見なされます。詳細はパブリック・ドメインのヘルプ ページを参照してください。 PD

サブページはウィキページに階層的な構造をもたらします。階層の各段階はスラッシュ(/)で区切られます。

動作する場所

By default, MediaWiki's subpage feature is turned off in the main namespace, but can be used on talk pages and user pages. See Help:Namespaces for description of namespaces and $wgNamespacesWithSubpages to learn how to modify this default behavior. In namespaces where the feature is switched off, any forward slashes (/) within a page name are simply part of the page name and do nothing special.

It’s not possible to use forward slashes in the title of a page from a namespace where subpages are activated, however 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 would need to use the solidus character to prevent having them marked as subpages, the corresponding page in the main namespace could keep an actual slash, is this goes unnoticed.


動作の仕組み

ページ名にスラッシュ (/) を使用することで、ページを親ページとサブページに再帰的に分割できます。例:

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.

Note that the part of page names after a slash is case sensitive including the first letter.

In subpages, (a) link(s) back to antecedent page(s) will automatically appear at the top. These links do not appear, however, if the antecedent pages have not yet been created or if the subpage feature is turned off.

サブページの用途

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.

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.

サブページの表示

以下のように Special:PrefixIndex を参照読み込みするだけでサブページを列挙できます:

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

結果は以下のようになります:

Subpages/ar Subpages/diq Subpages/en
Subpages/en-gb Subpages/es Subpages/fr
Subpages/id Subpages/it Subpages/ja
Subpages/ja/subpage Subpages/ko Subpages/pl
Subpages/pt Subpages/pt-br Subpages/ru
Subpages/sk Subpages/subpage Subpages/subpage/pl
Subpages/subpage/pt Subpages/subpage/pt-br Subpages/subpage/sub-subpage
Subpages/subpage/sub-subpage/pl Subpages/subpage/sub-subpage/pt
Subpages/subpage/sub-subpage/sub-sub-subpage Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage Subpages/subpage/subpage/pt-br
Subpages/subpage2 Subpages/subpage2/sub-subpage 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}}/}}. The subpage extensions, such as Extension:SubPageList, let you customize the display of subpages.

関連項目

This page is a translated version of a page Help:Subpages and the translation is 43% complete.