Help:Con­figu­ration para­meter "$smwgNamespaceIndex"

Jump to: navigation, search
edit with form

Configuration parameter details:
Title $smwgNamespaceIndex
Description Sets the index of the first namespace to be used by Semantic MediaWiki
Important noteImportant Note: Avoid changing the setting of this configuration parameter if you can.
Default setting
Software Semantic MediaWiki
Since version
Until version still available
Configuration Installation · Namespace
Keyword namespace

$smwgNamespaceIndex is a configuration parameter that is used to set the first namespace index to be used by Semantic MediaWiki. The default setting of 100 is done implicitly by the software. The setting was introduced in Semantic MediaWiki 0.7.

This parameter must be used if you already have custom namespaces on your wiki, which have namespace indices colliding with the indices 102, 103, 106 - 109 used by Semantic MediaWiki (102, 103, 108, 109) and Extension "Page Forms" (formerly known as Semantic Forms) (106, 107). Insert the following line into your "LocalSettings.php" file

$smwgNamespaceIndex = ???; // replace ??? with the index number needed

before enabling semantics with

enableSemantics( '' ); // replace with the name of your (sub)domain

The index number that replaces the default setting must be the smallest even namespace number that is not in use yet. However, it must be an even number and must not be smaller than 100 as well as equal to 102, 104 or 106. If you manually set the namespace index to e.g. 110 the actual index usage by Semantic MediaWiki will start with namespace index 112, i.e. the index will always be up by two in comparison to the setting. This behaviour used to avoid a namespace collision with a now omitted namespace called "Relation" which was supported from version 0.2 to 1.4.3 (legacy support from version 1.0 to 1.4.3) and used index 100.

NoteNote: Remember that the namespace indexes for the Extension "Page Forms" extension (formerly known as Semantic Forms) will not change but stay at 106 and 107 if you change this configuration setting. Apart from the default setting of 100 the lowest number for this setting should be 110 to avoid namespace conflicts!

See also