DokuWiki

It's better when it's simple

User Tools

Site Tools


namespaces

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
namespaces [2019-03-07 00:12] c()rb1nnamespaces [2024-04-18 14:58] (current) 136.226.109.24
Line 1: Line 1:
- 
- 
 ===== Creating Namespaces ===== ===== Creating Namespaces =====
  
Line 11: Line 9:
 In DokuWiki, pages are created as in every other wiki. Simply create a link to a non existing page, follow this link, and click on Create this page. See also [[.:page#create_a_page|Adding pages]]. In DokuWiki, pages are created as in every other wiki. Simply create a link to a non existing page, follow this link, and click on Create this page. See also [[.:page#create_a_page|Adding pages]].
  
-^  Examples:  ^^ +^  Examples:                                                                                                                                                                                                                                                                                                                                                                      || 
-|example\\ .example\\ .:example|refers to the page "example" in the **current** namespace.| +| example\\ .example\\ .:example          | refers to the page "example" in the **current** namespace.                                                                                                                                                                                                                                                                             
-|:example|refers to the page "example" in the **root** namespace.| +| :example                                | refers to the page "example" in the **root** namespace.                                                                                                                                                                                                                                                                                
-|..example\\ ..:example\\ .:..:example|refers to the page "example" in the **parent** namespace| +| ..example\\ ..:example\\ .:..:example   | refers to the page "example" in the **parent** namespace                                                                                                                                                                                                                                                                               
-|wiki:example|refers to the page "example" in the namespace "wiki". The namespace "wiki" is located **beneath the root** namespace.| +| wiki:example                            | refers to the page "example" in the namespace "wiki". The namespace "wiki" is located **beneath the root** namespace.                                                                                                                                                                                                                  
-|ns1:ns2:example\\ :ns1:ns2:example|refers to the page "example" in the namespace ns2. The namespace ns2 is located beneath the namespace ns1; the namespace ns1 is located **beneath the root** namespace.| +| ns1:ns2:example\\ :ns1:ns2:example      | refers to the page "example" in the namespace ns2. The namespace ns2 is located beneath the namespace ns1; the namespace ns1 is located **beneath the root** namespace.                                                                                                                                                                
-|.ns1:ns2:example\\ .:ns1:ns2:example|refers to the page "example" in the namespace ns2. The namespace ns2 is located beneath the namespace ns1; the namespace ns1 is located **beneath the current** namespace.| +| .ns1:ns2:example\\ .:ns1:ns2:example    | refers to the page "example" in the namespace ns2. The namespace ns2 is located beneath the namespace ns1; the namespace ns1 is located **beneath the current** namespace.                                                                                                                                                             
-|..ns1:ns2:example\\ ..:ns1:ns2:example|refers to the page "example" in the namespace ns2. The namespace ns2 is located beneath the namespace ns1; the namespace ns1 is located **beside the current** namespace (i.e. both ns1 and the current namespace are beneath the same parent namespace, wherever according to the root namespace this parent may be located itself).| +| ..ns1:ns2:example\\ ..:ns1:ns2:example  | refers to the page "example" in the namespace ns2. The namespace ns2 is located beneath the namespace ns1; the namespace ns1 is located **beside the current** namespace (i.e. both ns1 and the current namespace are beneath the same parent namespace, wherever according to the root namespace this parent may be located itself).  
-|.ns1:ns2:\\ .:ns1:ns2:|refers to the page "start" in the namespace ns2. The namespace ns2 is located beneath the namespace ns1; the namespace ns1 is located beneath the current namespace.\\ \\ (The default page can be named something other than "startby adjusting the [[config:startpage]] configuration setting.)+| .ns1:ns2:\\ .:ns1:ns2:                  | refers to start page of the namespace ns2. The namespace ns2 is located beneath the namespace ns1; the namespace ns1 is located beneath the current namespace.\\ \\ Please refer to [[#Namespace Default Linking]] below how the start page is determined | 
 +| ~example\\ ~:example                    | refers to the page "example", using the current page as a namespace. Eg. if used on the page "foo:bar", the link will refer to "foo:bar:example"This is an effective way of creating sub-namespaces from existing pages.                                                                                                             |
  
 :!: Gotcha: The syntax for relative and absolute internal links is non-unique and complex relative to directory and filename conventions. :!: Gotcha: The syntax for relative and absolute internal links is non-unique and complex relative to directory and filename conventions.
  
-Paths are absolute if and only if they begin with "/". 
  
 Links are absolute if and only if they have a ":" prefix or have no prefix but do have intermediate (or suffix) ":" Links are absolute if and only if they have a ":" prefix or have no prefix but do have intermediate (or suffix) ":"
Line 77: Line 75:
 ===== Namespace Default Linking ===== ===== Namespace Default Linking =====
  
-It is possible to link to the default file of a namespace by ending the linkid +It is possible to link to the default page of a namespace by ending the linkid 
-with a colon: %%[[foo:bar:]]%%. Which page the link links to is dependent on the +with a colon: ''%%[[foo:bar:]]%%''. Which page the link links to is dependent on the 
-existence of certain named files. For %%[[foo:bar:]]%% the following pages are+existence of certain named files. For ''%%[[foo:bar:]]%%'' the following pages are
 checked: checked:
  
Line 90: Line 88:
 The pages are checked in that order and whatever page is found first will be linked to. [[config:autoplural|Autoplural]] linking is not done for those links. The pages are checked in that order and whatever page is found first will be linked to. [[config:autoplural|Autoplural]] linking is not done for those links.
  
-===== Interwiki Links ===== +See [[config:startpage]] to learn about configuring the startpage name (defaults to ''start'').
- +
-DokuWiki supports Interwiki links. These are quick links to other Wikis. +
-For example: [[wp>Wiki]] is a link to Wikipedia's page about Wikis→ Main article: [[doku>Interwiki]]+
namespaces.1551913926.txt.gz · Last modified: 2019-03-07 00:12 by c()rb1n

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki