Table of Contents
Page Names
The pagename is the component of theURL that specifies the page. For example, theURL of the page you are currently reading ishttps://www.dokuwiki.org/pagename
, and its page name ispagename
.
Naming Conventions
Page names inDokuWiki are converted to lowercase automatically! Allowed characters are letters, digits and, within names1), the “special characters” dot.
, hyphen-
and underscore_
. All other special characters (i.e. other than letters and digits – whitespace, plus, slash, percent, etc.) are converted to underscores2) . Colons (:
) are used to identifynamespaces3).
When thedeaccent config option is enabled (on by default) local and accented characters are converted to their descriptive equivalents (ü
becomesue
) or deaccented versions (á
becomesa
).
An implicit constraint on pagename lengths is set bybacklinks (pagenames need to have 3 chars at least to be considered in backlinks).
Most templates, including the default, present somewhere the full pagename and thenamespaces in its path. The 'dokuwiki' template places it in the tab on the top right corner of the page. For example this page's name ispagename
.
When linking to other Wikis usingInterWiki links the name restrictions of these Wikis apply.
Even whenCamelCase (aka. WikiWord) is enabled by theCamelCase config the pagenames will remain lowercase.
Note: All restrictions given here for pagenames do apply to media files as well!
Pagenames and Namespaces
You may picture namespaces as directories and pagenames as files inside them.
Therefore thea:b:c
pagename can be pictured as:
root namespace (always present) │ └── 'a' namespace │ └── 'b' namespace │ └── 'c' pagename
Note that you can have a pagename and a namespace with the same name, at the same time, within any namespace. Back to the above example, thea:b
pagename can be pictured as:
root namespace (always present) │ └── 'a' namespace │ └── 'b' pagename (not to be confused with the 'b' namespace above)
This doesn't lead to conflicts, because DokuWiki treats the final token (the one after the last colon) as the name of thepage itself, while all other tokens are namespaces.
- In
a:b:c
,a
andb
are namespaces whilec
is a page. - In
a:b
,a
is interpreted as a namespace andb
as a page.
Seenamespaces for more details.
Hacking the Core for mixed case names
Some people like to hack the DokuWiki core to be able to use mixed case names. This is not recommended and not officially supported and might break DokuWiki functionality in non-obvious ways.
You can hack the code and by commenting out one line in the wiki/inc/pageutils.php about line 109, you will be able to use files with Names_Like_This, if you so choose.Look for this code and comment it out.
$id= utf8_strtolower($id);
This hack, used by me a few years and announced to the User-Forum. Seems not to work with Anteater.
Any idea, to have it there too?
I got to this page needing this hack, along with an ability to also allow spaces in filenames. I added a configurable hack. Default dokuwiki is kept and hack is only used if the appropriate $conf options are used. See the changelog at:https://github.com/ahmetsacan/dokuwiki/commit/0bd10be989c0ea582549ea26ec76f642bf12a6db Sorry, I don't have time to advocate for this change in a pull-request. Use at your own risk.
Also seethis thread.