Loading...
 
Skip to main content

Namespaces

Available since Tiki10. By default, the namespace separator is set to :_: (colon, underscore, colon), but this can be changed in the "Admin Wizard: Set up Namespace" or in the Workspace admin panel.

You can also have multiple levels of namespaces.

1.1. Activating name spaces

You can do so since Tiki12 in one of the last screens of the Admin Wizard (see "Set up some advanced options" ), and you can set it up in the next screen ("Set up Namespace"). Or if you search for "Namespace" in tiki-admin.php (activate experimental preferences, as of Tiki12 )

Namespaces Capture 20140418173843 322 0

1.2. How to use

1.2.1. Easiest: through Workspaces UI

The easiest way to take advantage of the Namespaces feature is to use it through the Workspaces UI feature, which will peform the hard work for you (objects, categories, permissions, perspectives, namespaces...).

Alternatively, you can create your wiki pages following common namespaces by hand (see below).

1.2.2. Custom: hand-made

Create 2 pages with the following names and they will both be in the same abc namespace:

  • abc:_:123
  • abc:_:456


1.3. User pages

In Tiki, user pages follow the convention

Copy to clipboard
User:JohnSmith

1.4. Categories

Similar but different to namespaces, you can categorize pages in any number of categories. Whereas a page can only be in one namespace.

The easiest way to take advantage of the Namespaces feature is to use it through the Workspaces UI feature, which will peform the hard work for you, setting also the categories and perspectives that comply with the namespaces you chose for them.

1.5. Best Practice

The default ":_:" namespace separator will be urlencoded to "%3A_%3A" which is not really human readable. According to https://stackoverflow.com/questions/1856785/characters-allowed-in-a-url the only really usable characters, if one wants to avoid urlencoding, are: "-" / "." / "_" / "~". So best practice would be to build your seperator from these characters to end up with human-readable URLs. It would be perfectly possible to use just a single character like the ".", but that might be used in a page name and therefore users could end up creating a namespace by accident. It really depends on one's use case. The author of this paragraph once had a site where ~username was used for the UserPage, so it wouldn't work on this kind of geek-site. Apart from that the ~ works very nicely. It is quite a rare character and in the average wiki use case won't appear in page names.

alias