Difference between revisions of "Help:Subpage"

MyWikiBiz, Author Your Legacy — Saturday November 23, 2024
Jump to navigationJump to search
 
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:
 
*<nowiki>[[/s]]</nowiki> links to a subpage, e.g. on A it is the same as <nowiki>[[A/s]]</nowiki>.
 
*<nowiki>[[/s]]</nowiki> links to a subpage, e.g. on A it is the same as <nowiki>[[A/s]]</nowiki>.
  
See also [[w:Centiare:Subpage]], and the example pages [[m:Link/a/b]] and [[m:Help:Link/a/b]]. For the latter the subpage feature does not work because of the namespace.
+
See also [[w:Help:Subpage]], and the example pages [[m:Link/a/b]] and [[m:Help:Link/a/b]]. For the latter the subpage feature does not work because of the namespace.
  
 
=== User space ===
 
=== User space ===
Line 28: Line 28:
 
To create a subpage, simply use a forward slash (/) after the Directory and/or User name. Example:
 
To create a subpage, simply use a forward slash (/) after the Directory and/or User name. Example:
 
<pre>
 
<pre>
[[Directory:Centiare/Services]]
+
[[Directory:MyWikiBiz/Services]]
 
</pre>
 
</pre>

Latest revision as of 20:02, 27 December 2007

See also Help:Subpage feature for more information on linking and subpages.

MediaWiki has a Subpage feature, although activation depends on project and namespace. If activated, the following applies (if not, "A/b" is just a page with that name).

A tree structure of pages is established by using forward slashes in pagenames: A/b is a child of A, hence A is a parent of A/b; also A/b/c is a child of A/b; A/a, A/b, and A/c are siblings.

At the top of the subpage body links to all ancestor pages are shown automatically, without any corresponding wikitext. The links show up even if the parent page does not exist, but the sequence of ancestors stops before any non-existing ancestor page (e.g., if the grandparent page does not exist, the parent page is not shown either). Like most letters of a page name, the first letter after the slash is case-sensitive; "/subpage" and "/Subpage" are different pages.

What links here and Related changes ignore these automatic links.

Relative links

Relative links still work if all pages of a tree are renamed according a name change of the root, including making it a child of a new root.

Inside a subpage hierarchy the following relative links can be used:

  • [[../]] links to the parent of the current subpage, e.g., on A/b it links to A, on A/b/c it links to A/b.
  • [[../s]] links to a sibling of the current subpage, e.g., on A/b, it links to A/s.
  • [[/s]] links to a subpage, e.g. on A it is the same as [[A/s]].

See also w:Help:Subpage, and the example pages m:Link/a/b and m:Help:Link/a/b. For the latter the subpage feature does not work because of the namespace.

User space

Subpages of a user page ([[User:Username/Subpage]]) are considered to be in that user's "user space". Rules are often relaxed in a user's own subpages, whereas they are typically tightened for a user editing another user's subpages.

Unintended subpage structure

Any slash in a pagename causes a subpage structure, e.g. Subpage demo Season 2006/2007 is a subpage of "Subpage demo Season 2006". As long as the latter does not exist, this has no effect on the former, However, a page with a slash in its name cannot be the root page of a subpage structure. For example, Subpage demo Season 2006/2007 /soccer does not show its parent, because its unintended grandparent does not exist. A dummy grandparent page can fix this.

Subpage activation

To create a subpage, simply use a forward slash (/) after the Directory and/or User name. Example:

[[Directory:MyWikiBiz/Services]]