Help:Links

From Wikibooks, the open-content textbooks collection

(Redirected from Help:Piped link)
Jump to: navigation, search

Book modules are accessed through links which readers can follow. Wikibooks should cover material in their scope in detail, and be conservative in linking to pages outside the book (and especially so to pages outside Wikibooks).

For syntax and basic usage, see the official MediaWiki documentation at mw:Help:Links.

[edit] Subpages

Wikibooks uses a special MediaWiki feature, not discussed on the software help page, which helps construct a hierarchical structure, useful to bind books (and chapters) together. A page is a sub-page if it has a slash "/" in its title, and the part in front of the slash is a page-name.

As an example: Japanese/Introduction is a sub-page because Japanese exists, but Japanese/Lessons/Introduction/Lesson 1/Unit 1-1/Answers is a page with the name "Lesson 1/Unit 1-1/Answers" because Japanese/Lessons/Introduction/Lesson 1 doesn't exist.

The MediaWiki software automatically generates links to each parent page, just below the page title. Sub-pages are therefore useful to group pages into chapters when readers might reasonably want easy access to the parent page (giving overview to other sub-pages). Deep hierarchies, however, are usually not necessary as structure can be generated just by linking to pages from specific overview (chapter) pages. Flatter structure also makes restructuring books easier as only links must be changed, and no pages moved.

The Horticulture book illustrates flat page structure. Every page name in the Horticulture book consists of only two parts, the book title and the page name, with a single slash between them.

Sub-pages can be linked to with relative links, without giving the full page name. The following example shows how we link to various pages from the hypothetical Snappy title/Logical section/. Note that that the full page name in the link title can be suppressed by appending another slash. For more flexibility, use a piped link as normal.

Full page name of the link target Relative link Displays as
Snappy title [[../]] Snappy title
Snappy title/Sister page [[../Sister page]] Snappy title/Sister page
Snappy title/Sister page [[../Sister page/]] Sister page
Snappy title/Logical section/interesting topic [[/interesting topic]] Snappy title/Logical section/interesting topic
Snappy title/Logical section/interesting topic [[/interesting topic/]] interesting topic

Note that the first character of sub-pages is case-sensitive.

[edit] Interwiki linking

Pages on other Wikimedia projects can be linked to without specifying their full URIs. An example is the following link to the Wikimedia Meta wiki which that goes into this with more detail.

[edit] See also