Help:Configuration parameter "$smwgPageSpecialProperties"

Jump to: navigation, search
Title $smwgPageSpecialProperties
Description Sets the page related special properties to be used.
Default setting
array( '_MDAT' );
Software Semantic MediaWiki
Introduced with version 1.7.0
Removed with version still available
Configuration Installation
Keyword Page related special properties · Special property · Store

$smwgPageSpecialProperties is a configuration parameter that is used to enable or disable page-related special properties. The setting was introduced in Semantic MediaWiki 1.7.0.

Default setting

$smwgPageSpecialProperties = array( '_MDAT' );

Thus special property "Modification date" is active from start.

Available special properties

The following page related special properties are available for this configurations setting:
Help pageNameAliasDescriptionAddedLabel
Special property Modification dateModification datehas no aliasIt has a fixed value that corresponds to the date of the last modification of each page1.4.0_MDAT
Special property Creation dateCreation datehas no aliasIt has a fixed value that corresponds to the date of the first revision of each page1.7.0_CDAT
Special property Last editor isLast editor ishas no aliasHolds the page name of the user who created the last page revision1.7.1_LEDT
Special property Is a new pageIs a new pagehas no aliasMarks a page as being new or not1.7.1_NEWP
Special property MIME typeMIME typehas no aliasHolds the MIME type of an uploaded file1.9.1_MIME
Special property Media typeMedia typehas no aliasHolds the Media type of an uploaded file1.9.1_MEDIA
Special property "Has uniqueness constraint"Has uniqueness constrainthas no aliasRestrict value annotation to be unique2.4.0SMW_DV_PVUC
Special property Language codeLanguage codehas no aliasHandles BCP47 conform language codes specifying the language of the annotated text2.4.0SMW_DV_MLTV_LCODE
Special property Allows patternAllows patternhas no aliasPattern to match a permissible value2.4.0SMW_DV_PVAP
Special property Display title ofDisplay title ofhas no aliasDisplay an specific denote title for an entity2.4.0_DTITLE

Changing the default setting

Changes to the standard setting of this configuration parameter are done in the "LocalSettings.php" file after the inclusion of Semantic MediaWiki. Every time a change to this configuration setting is done, the SQL storage, if used, has to be updated (php maintenance/update.php), and Semantic MediaWiki's data has to be refreshed. See help page Repairing SMW's data for information on how to do this.


To disable page-related special properties the following setting is used:

$smwgPageSpecialProperties = array( );

There are different possibilities to enable the available page related special properties. To do this the existing configuration has to be extended by the labels of the respective special properties.


Adding them with individual settings:

$smwgPageSpecialProperties[] = '_CDAT';


$smwgPageSpecialProperties[] = '_NEWP';


Adding them with one setting:

$smwgPageSpecialProperties = array_merge(
       $smwgPageSpecialProperties, array( '_CDAT' )


$smwgPageSpecialProperties = array_merge(
        $smwgPageSpecialProperties, array( '_CDAT', '_NEWP' )


The above mentioned settings add additional page related special properties to the special property "Modification date" which is automatically set by SMW itself. In case you do not need special property "Modification date" but other page related special properties the parameter setting has to be rewritten entirely:

$smwgPageSpecialProperties = array( '_CDAT' );

only special property "Creation date" is enabled

$smwgPageSpecialProperties = array( '_CDAT', '_NEWP' );

only special properties "Creation date" and "Is a new page" are enabled, etc.

Rewriting the parameter setting is also possible for just adding another page related special property, e.g.:

$smwgPageSpecialProperties = array( '_MDAT', '_CDAT' );

enables the special properties "Modification date" and "Creation date".

This documentation page applies to all SMW versions from 1.7.0 to the most current version.
      Other languages: frzh-hans

Help:$smwgPageSpecialProperties en 1.7.0