「ヘルプ:Subpages」を編集中
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
1行目: | 1行目: | ||
− | + | {{PD Help Page}} | |
− | {{ | + | '''Subpages''' introduce some hierarchical organization into wiki pages, with levels of the hierarchy separated by slashes (<code>/</code>). |
− | |||
− | |||
− | '''Subpages''' introduce some hierarchical organization into wiki pages, with levels of the hierarchy separated by slashes ( | ||
− | === Where it works === | + | === Where it works === |
− | + | By default, MediaWiki’s subpage feature is turned off in the main namespace, but can be used on [[Help:Talk pages|talk pages]] and [[Help:User page|user pages]]. See [[Help:Namespaces]] for description of namespaces and [[Manual:$wgNamespacesWithSubpages#Enabling for a namespace]] to learn how to modify this default behaviour. 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. | |
− | By default, | ||
− | + | 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 "[[wikt:⧸|big solidus]]" (U+29F8), which results in Foo⧸bar (cf. a real slash: Foo/bar), or the [[wikt:⁄|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 [[Manual:Namespace#Subject and talk namespaces|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. | ||
− | + | === How it works === | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === How it works === | ||
− | |||
Slashes (/) within a page name break the page into parent and subpages, recursively, e.g.: | Slashes (/) within a page name break the page into parent and subpages, recursively, e.g.: | ||
− | |||
* [[Help:Subpages]] – this page | * [[Help:Subpages]] – this page | ||
* [[Help:Subpages/subpage]] – child page | * [[Help:Subpages/subpage]] – child page | ||
35行目: | 21行目: | ||
* [[Help:Subpages/subpage/sub-subpage/sub-sub-subpage/sub-sub-sub-subpage]] – great 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#Internal links]]. | |
− | 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 [[ | ||
− | |||
− | |||
− | |||
− | |||
Note that the part of page names after a slash is case sensitive '''including the first letter.''' | 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. | |
− | |||
− | + | === Use of subpages === | |
− | |||
− | |||
− | |||
− | |||
There are various uses for the subpage feature. Some of the typical usages of subpages are: | There are various uses for the subpage feature. Some of the typical usages of subpages are: | ||
− | * to create archives of old discussions under a [[ | + | * to create archives of old discussions under a [[Help:Talk pages|talk page]], |
− | * to create scratchpad editing spaces under a [[ | + | * to create scratchpad editing spaces under a [[Help:User page|user page]], |
− | * to create other language versions of a document in multilingual wikis | + | * 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 [[Help:Category|category]] feature, which is more suitable for creating a hierarchical network of information. | |
− | + | == Displaying subpages == | |
Subpages can be listed very plainly by transcluding [[Special:PrefixIndex]], like this: | Subpages can be listed very plainly by transcluding [[Special:PrefixIndex]], like this: | ||
− | |||
<pre> | <pre> | ||
74行目: | 43行目: | ||
</pre> | </pre> | ||
− | |||
− | |||
Which produces this: | Which produces this: | ||
− | |||
{{Special:PrefixIndex/Help:Subpages/}} | {{Special:PrefixIndex/Help:Subpages/}} | ||
− | + | Since the [[Help:Magic_words|magic word]] <nowiki>{{FULLPAGENAME}}</nowiki> outputs the current page, the general wiki markup to show all subpages of the current page is <code><nowiki>{{Special:PrefixIndex/{{FULLPAGENAME}}/}}</nowiki></code>. | |
− | + | The [[:Category:Subpage extensions|subpage extensions]], such as [[Extension:SubPageList]], let you customize the display of subpages. | |
− | Since the [[ | ||
− | |||
− | |||
− | |||
− | |||
− | + | == See also == | |
− | |||
− | + | * [[Manual:$wgNamespacesWithSubpages]] | |
+ | * [[Meta:Help:Link#Subpage feature]] | ||
+ | * [[Help:Variables#Page names]] | ||
+ | * [[Special:PrefixIndex]] – Provides a list of subpages. | ||
+ | * [[:Category:Subpage_extensions|Subpage related extensions]] | ||
− | + | {{languages}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[Category:Help | + | [[Category:Help|{{PAGENAME}}]] |
− | [[Category:Subpage | + | [[Category:Subpage|{{PAGENAME}}]] |