====== Namespaces ======
[[DokuWiki]] supports so called //namespaces// to separate different types of content in the wiki. For example all information about DokuWiki is in the ''wiki'' namespace. Namespaces are created by colons in the [[pagename]]. Alternatively you can use a semicolon and -- when [[doku>wiki:config#useslash|useslash]] is enabled -- a slash as namespace separator.
If there is no colon in a linked pagename the current namespace is assumed. You can escape to the default namespace by prepending a colon to the pagename. Here are some examples:
* [[wiki:start]] links to ''wiki:start''
* [[start]] links to ''wiki:start''
* [[:start]] links to ''start''
* [[wiki:start]] links to ''wiki:start''
* [[start]] links to ''wiki:start''
* [[:start]] links to ''start''
Sometimes you may want to link to a subnamespace without giving the full namespace. You can start the link with a dot (''.'') to always prepend the current namespace. Again some examples:
* [[discussion]] links to ''wiki:discussion''
* [[discussion:visibility]] links to ''discussion:visibility''
* [[.discussion:visibility]] links to ''wiki:discussion:visibility''
* [[discussion]] links to ''wiki:discussion''
* [[discussion:visibility]] links to ''discussion:visibility''
* [[.discussion:visibility]] links to ''wiki:discussion:visibility''
Namespaces are helpful to categorize or structure the content..
One can use them to split content about the same subject from other unrelated content. This split occurs at two levels: storage and linking.
* storage - namespaces are stored as folders (directories) on the host file system. This helps keeping content about the same subject inside one folder, where all raw text files from the documents with that content are contained. Very handy to administrators, to work with the raw text files. Example: backup all project XYZ documents => backup folder projectXYZ/*.txt
* linking - namespaces are the prefix before each page name. The raw text file with the content for that page will be stored inside the folder , and while viewing documents belonging to that namespace, one can refer to all other documents of that namespace without having to prefix it with . That prefix is only necessary when linking pages outside this namespace to pages inside it.
Note: pages and documents are both the same entity: document with content = HTML page.