History: Namespaces
Source of version: 26 (current)
Copy to clipboard
! Namespaces Available since ((Tiki10)). By default, the namespace separator is set to :_: (colon, underscore, colon), but this can be changed in the "[Admin+Wizard?structure=HomePage+AdminGuide#Set_up_Namespace|Admin Wizard: Set up Namespace]" or in the ((Workspace)) admin panel. You can also have multiple levels of namespaces. !!# Activating name spaces You can do so since ((Tiki12)) in one of the last screens of the ((Admin Wizard)) (see "[Admin+Wizard?structure=HomePage+AdminGuide#Set_up_some_advanced_options|Set up some advanced options]" ), and you can set it up in the next screen ("[Admin+Wizard?structure=HomePage+AdminGuide#Set_up_Namespace|Set up Namespace]"). Or if you search for "Namespace" in tiki-admin.php (activate experimental preferences, as of ((Tiki12)) ) {img fileId="1079"} !!# How to use !!!# 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). !!!# Custom: hand-made Create 2 pages with the following names and they will both be in the same abc namespace: * abc:_:123 * abc:_:456 !!# User pages In Tiki, ((user pages)) follow the convention {CODE()}User:JohnSmith{CODE} !!# 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. !!# 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. !!# Related * ((Workspaces UI)) * https://www.mediawiki.org/wiki/Help:Namespaces -=alias=- *(alias(NameSpace)) | (alias(Names Spaces)) | (alias(Name Space))