Extension:NamespaceManager

The NamespaceManager extension allows the definition of namespaces in JSON format. This allows for easy definition and programmatic addition of namespaces. Eventually, it will feature a special page that allows for the creation and modification of namespaces on your wiki without needing to define them using.

There was an "extension" with this same name (actually, it was a helper library) many years ago, but it has not been maintained for many years and has been archived. Therefore, this extension now uses this name.

Configuration parameters

 * $wgNamespaceManagerDir: The location where your NamespaceManager JSON definition files are stored. (It should've been called $wgNamespaceManagerDataPath, and might be renamed that in a future release.) By default, it is defined as . You can change this to be either an absolute path anywhere on your filesystem or a relative path rooted in the NamespaceManager base directory and use   in the path, where   is the value of   of your wiki.

Defining namespaces
Currently, the only way to define a namespace is manually by editing the  JSON file.

See for an example of how to define a   file.

For instance, you can create a file in the following format:

[   {        "name": "IT", "content": true },   {        "name": "Human Resources", "content": false } ]

This would create four namespaces: IT, IT talk, Human Resources, and Human Resources talk, with IDs 3000, 3001, 3002, and 3003 respectively. The order in which the namespaces are listed determine which ID it is assigned, and all namespaces in this extension are assigned contiguously. For this reason, it is important that the order never be changed after your first page in a namespace is created.

Important: Despite the JSON suggesting otherwise, the current release does NOT yet support setting a namespace as a content namespace. This will come in a future release. However, the current JSON schema displayed here will be used in the future to define a namespace as a content namespace or not.

To-do list

 * Add support for defining a namespace as a content namespace or not
 * Add a special page to manage the JSON file
 * Add a different offset at which to begin NamespaceManager's namespace definition