v3.0.0+
Status: | effective |
Progress: | 100% |
Version: | 3.0.0+ |
$smwgNamespaceIndex
From Linux Web Expert
Template:Interlanguagelink: en
Configuration parameter details: | |
Name | $smwgNamespaceIndex |
Description | Sets the index of the first namespace to be used by Semantic MediaWiki File:OOjs UI icon lightbulb-yellow.svg <translate> Note:</translate>Avoid changing the setting of this configuration parameter if you can. |
Default setting | 100 |
Software | Semantic MediaWiki |
Since version | |
Until version | still available |
Configuration | Installation · Namespace |
Keyword | namespace |
__NOBREADCRUMBLINKS__
$smwgNamespaceIndex
is a configuration parameter that is used to set the first namespace index to be used by Semantic MediaWiki. The configuration parameter was introduced in Semantic MediaWiki 0.7Released on an unknown date unknown versions of MediaWiki.
Only change the setting to this configuration parameter on initial installation of extension "Semantic MediaWiki"No description was provided.. In general you should avoid changing the setting of this configuration parameter if you can.
This configuration parameter must be used if you already have custom namespaces on your wiki, which have namespace indices colliding with the indices
102
to 111
used by Semantic MediaWiki (102
, 103
, 108
, 109
, 112
, 113
, 114
and 115
) and extension "Page Forms"No description was provided. (106
, 107
) and other extensions.
Default setting
$smwgNamespaceIndex = 100;
This index number is set implicitly and means that the allocation of namespace indices used starts at 100
with Semantic MediaWiki using the namespace indices 102
, 103
, 108
, 109
, 112
, 113
, 114
and 115
.
Changing the default setting
To modify the setting to this configuration parameter, add the following line to your "LocalSettings.php" file before the enableSemantics()
call:
- Make namespace numbering start at
112
$smwgNamespaceIndex = 112;
This means that Semantic MediaWiki will use the namespace indices 114
, 115
, 120
, 121
, 124
, 125
, 126
and 127
.
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
, 106
, 108
or 110
. If you manually set the namespace index to e.g. 112
the actual index usage by Semantic MediaWiki will start with namespace index 114
, 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
.
Remember that the namespace indices for extension "Page Forms"No description was provided. will not change but stay at
106
and 107
if you change the setting of this configuration parameter. Apart from the default setting of 100
the lowest number for setting this configuration parameter should be 112
to avoid namespace conflicts with other extensions!