Help:$smwgNamespaceIndex

From semantic-mediawiki.org
Jump to: navigation, search
Title $smwgNamespaceIndex
Description Sets the first namespace index to be used. IMPORTANT NOTE: Avoid changing the setting of this configuration parameter if you can.
Default setting
100
Software Semantic MediaWiki
Introduced with 0.7
Deprecated with still available
Configuration Installation
Keyword Namespace
Referenced by N/A

$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 Semantic Forms (106, 107). Insert

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

into your "LocalSettings.php" file before enabling semantics with

enableSemantics( 'example.org' ); // replace example.org 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.

Also note that 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 Semantic Forms will not change but stay at 106 and 107 if you change this configuration setting. Thus apart from the default setting of 100 the lowest number for this setting should be 110 to avoid namespace conflicts!

See also