User Tools

Site Tools


en:wiki:namespaces

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:wiki:namespaces [2018/09/18 12:53]
bahnfrank65
en:wiki:namespaces [2018/09/23 15:45] (current)
bahnfrank65 [Creating Namespaces]
Line 1: Line 1:
-====== Namespaces ​======+===== Namespaces =====
  
 A namespace is similar to a directory or folder, while pages are similar to files. A namespace is similar to a directory or folder, while pages are similar to files.
-In [[DokuWiki]] ​ you can use namespaces to categorize your pages. For names of namespaces the same restrictions hold as for [[pagename|pagenames]].+In [[en:start|DokuWiki]] ​ you can use namespaces to categorize your pages. For names of namespaces the same restrictions hold as for [[pagename|pagenames]].
    
 A default DokuWiki installation comes with the built-in namespaces: //wiki// and //​playground//​. A default DokuWiki installation comes with the built-in namespaces: //wiki// and //​playground//​.
  
-===== Creating Namespaces ​=====+==== Creating Namespaces ====
  
 You don't need to create namespaces separately; simply create pages with colons in the [[pagename]]. ​ You don't need to create namespaces separately; simply create pages with colons in the [[pagename]]. ​
Line 25: Line 25:
 |..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 "​start"​ by adjusting the [[config:​startpage]] configuration setting.)| ​ |.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 "​start"​ by adjusting the [[config:​startpage]] configuration setting.)| ​
 +
 +** In order to avoid possible malfunctions,​ which may possibly arise from the hierarchy with multiple languages, we should always always specify the entire path, for example: ** <​code>​[[de:​traffic:​timetable|timetable]]</​code>​
  
 :!: 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.
Line 34: Line 36:
 Links relative to the current namespace may also begin with either "​."​ or "​.:"​ ("​.."​ or "​..:"​ for parent namespace). Links relative to the current namespace may also begin with either "​."​ or "​.:"​ ("​.."​ or "​..:"​ for parent namespace).
  
-===== Deleting namespaces ​=====+==== Deleting namespaces ====
  
 When all pages inside a namespace are removed (see [[page#​delete_a_page|delete a page]]) the namespace logically doesn’t exist anymore. DokuWiki usually deletes the now empty directory as well. When all pages inside a namespace are removed (see [[page#​delete_a_page|delete a page]]) the namespace logically doesn’t exist anymore. DokuWiki usually deletes the now empty directory as well.
  
-===== How  to rename namespaces? ​=====+==== How  to rename namespaces? ====
  
-==== Manual way ====+=== Manual way ===
  
 In order to rename a namespace manually you will have to: In order to rename a namespace manually you will have to:
Line 71: Line 73:
 DISCLAIMER: I understand this is convoluted (and maybe I missed/​messed a couple of things you should also do). All in all this is a PITA. You may also use a couple of [[plugins]] that are available for (re)building the searchindex for the complete wiki, erasing entire cache and/or old wiki revisions thus avoiding having to do this manually. DISCLAIMER: I understand this is convoluted (and maybe I missed/​messed a couple of things you should also do). All in all this is a PITA. You may also use a couple of [[plugins]] that are available for (re)building the searchindex for the complete wiki, erasing entire cache and/or old wiki revisions thus avoiding having to do this manually.
  
-===== 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 file of a namespace by ending the linkid
Line 86: 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 =====+==== Interwiki Links ====
  
 DokuWiki supports Interwiki links. These are quick links to other Wikis. 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]] For example: [[wp>​Wiki]] is a link to Wikipedia'​s page about Wikis. → Main article: [[doku>​Interwiki]]
en/wiki/namespaces.1537268003.txt.gz · Last modified: 2018/09/18 12:53 by bahnfrank65