This help page provides an overview of the namespaces and their usage by Semantic MediaWiki and related extensions.
Extensions[edit]
ID
|
Name
|
Constant
|
Note
|
100
|
Relation
|
SMW_NS_RELATION
|
Support introduced with Semantic MediaWiki 0.1Released on 30 September 2005 and compatible with MW 1.4.x - 1.6.x., no longer used as of Semantic MediaWiki 1.0Released on 31 December 2007 and compatible with MW 1.9.x - 1.12.x., and support dropped with Semantic MediaWiki 1.5.0Released on 7 March 2010 and compatible with MW 1.14.x - 1.17.x..
|
101
|
Relation_talk
|
SMW_NS_RELATION_TALK
|
See namespace 100 (Relation).
|
102
|
Property
|
SMW_NS_PROPERTY
|
Support introduced with Semantic MediaWiki 0.1Released on 30 September 2005 and compatible with MW 1.4.x - 1.6.x..
|
103
|
Property_talk
|
SMW_NS_PROPERTY_TALK
|
See namespace 102 (Property).
|
104
|
Type
|
SMW_NS_TYPE
|
Support introduced with Semantic MediaWiki 0.1Released on 30 September 2005 and compatible with MW 1.4.x - 1.6.x., no longer used as of Semantic MediaWiki 1.6.0Released on 30 July 2011 and compatible with MW 1.15.x - 1.18.x., and support dropped with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x.12
|
105
|
Type_talk
|
SMW_NS_TYPE_TALK
|
See namespace 104 (Type).
|
108
|
Concept
|
SMW_NS_CONCEPT
|
Support introduced with Semantic MediaWiki 1.2.0Released on 10 July 2008 and compatible with MW 1.11.x - 1.14.x..
|
109
|
Concept_talk
|
SMW_NS_CONCEPT_TALK
|
See namespace 108 (Concept).
|
112
|
Rule
|
SMW_NS_RULE
|
Support introduced with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x.3, never used, and support dropped with Semantic MediaWiki 5.0.0Released on 10 March 2025 and compatible with MW 1.39.0 - 1.43.x.4
|
113
|
Rule_talk
|
SMW_NS_RULE_TALK
|
See namespace 112 (Rule).
|
114
|
smw/schema
|
SMW_NS_SCHEMA
|
Allows to describe schema types individually either in JSON or YAML (where available5) according to schema types provided in configuration parameter $smwgSchemaTypes Sets the mappings between a specific schema type, an accompanying schema group and a possible schema interpreter. Support introduced with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..63
|
115
|
smw/schema_talk
|
SMW_NS_SCHEMA_TALK
|
See namespace 114 (smw/schema).
|
ID
|
Name
|
Constant
|
Note
|
106
|
Form
|
PF_NS_FORM
|
In case you are still using Semantic Forms (now extension "Page Forms"Allows to create and use forms for adding and editing pages with and without semantic data) the constant is called SF_NS_FORM
|
107
|
Form_talk
|
PF_NS_FORM_TALK
|
See namespace 106 (Form).
|
ID
|
Name
|
Constant
|
Note
|
170
|
Filter
|
SD_NS_FILTER
|
No longer used, as of version 2.0, support dropped with version 2.1
|
171
|
Filter_talk
|
SD_NS_FILTER_TALK
|
See namespace 170 (smw/schema).
|
Configuration[edit]
- configuration parameter
$smwgNamespacesWithSemanticLinks
Defines for which namespaces the semantic links and annotations are to be evaluated - Allows to set which namespaces Semantic MediaWiki should use
- configuration parameter
$smwgNamespaceIndex
Sets the index of the first namespace to be used by Semantic MediaWiki - Allows to set the indexes for namespaces for usage by Semantic MediaWiki
- configuration parameter
$smwgHistoricTypeNamespace
Sets whether the namespaces "Type" and "Type talk" can be accessed - Allows to set whether the "Type" namespaces are accessible
Starting with Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x. the namespaces "Property" and "Concept" are automatically added to the following two configuration parameters which are provided by MediaWiki itself.7
- 1. configuration parameter
$wgContentNamespaces
(MediaWiki.org) - Allows to set which namespaces are to be acknowledged as containing useful content
Note:
- If you are upgrading from Semantic MediaWiki 2.4.x and earlier you may want to run maintenance script "updateArticleCount.php" (MediaWiki.org) to update the statistics displayed on special page "Statistics".
- If you do not want the two namespaces mentioned to be recognized as content namespaces you will have to explicitly set this configuration parameter in you "LocalSettings.php" file after the inclusion of Semantic MediaWiki.
- 2. configuration parameter
$wgNamespacesToBeSearchedDefault
(MediaWiki.org) - Allows to set which namespaces are enabled for searching by default
Note: If you do not want the two namespaces mentioned to be searched by default you will have to explicitly set this configuration parameter in you "LocalSettings.php" file after the inclusion of Semantic MediaWiki.
When also using Wikibase[edit]
Both extension "Wikibase" (MediaWiki.org) and extension Semantic MediaWiki add a namespace called "Property". This results in a conflict that must be resolved by renaming the Wikibase property namespace or the Semantic MediaWiki property namespace. Here we describe how to rename the Wikibase property namespace.8 To do this, add the following code to your "LocalSettings.php" file after the inclusion of Semantic MediaWiki and Wikibase.
$wgHooks['CanonicalNamespaces'][] = static function ( &$list ) {
global $wgExtraNamespaces;
$wgExtraNamespaces[WB_NS_PROPERTY] = $list[WB_NS_PROPERTY] = 'Wikibase_property';
$wgExtraNamespaces[WB_NS_PROPERTY_TALK] = $list[WB_NS_PROPERTY_TALK] = 'Wikibase_property_talk';
};
Querying[edit]
See also[edit]