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

Jump to: navigation, search
edit with form

Title $smwgPDefaultType
Description Sets the default datatype for a property if it was not defined manually
Default setting
Software Semantic MediaWiki
First version supported
Last version supported still available
Configuration Miscellaneous
Keyword property · datatype

$smwgSubPropertyListLimit is a configuration parameter that sets the default datatype for an undefined property, i.e. if the datatype was not specified by adding special property "Has type" to the respective property's page. The configuration parameter was introduced in Semantic MediaWiki 1.1.2.

Default setting

$smwgPDefaultType = '_wpg';

This means that by default all undefined properties, i.e. those without pages or whose pages have no "has type" statement, will be assumed to be of datatype "Page" specified by the corresponding internal datatype ID.

Changing the default setting

To modify this configuration setting, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Replace the default datatype "Page" by datatype "Text"
$smwgPDefaultType = '_txt';
NoteNote: Under regular circumstances settings other than '_wpg' or '_txt' are not recommended.
Important noteImportant Note: After changing the setting for this configuration parameter the semantic data have to be rebuild either via the command line using the "rebuildData.php" maintenance script or by triggering the special task "Data repair and update" by clicking the button labeled "Start updating data" in the "Data repair and update" section on special page "Semantic MediaWiki".

List of internal datatype IDs

NoteNote: The internal datatype IDs are specified in the files located at "/i18n/extra/XX.json".

See also