$smwgPropertyReservedNameList
Configuration parameter details: | |
Name | $smwgPropertyReservedNameList |
Description | Sets which names are reserved from usage as property names |
Default setting | See below |
Software | Semantic MediaWiki |
Since version | |
Until version | still available |
Configuration | Miscellaneous |
Keyword | property · property naming |
$smwgPropertyReservedNameList
is a configuration parameter that sets which names are reserved from usage as property names. It was introduced in Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..1
Listed names are reserved as they may interfere with MediaWiki, Semantic MediaWiki or another extension. This list is extendable and may also be used to customize use cases for an individual wiki. The creation of the property is not blocked by default (see also create protection) and a property with a reserved name can still be used. However a warning message will appear on the property page of a matchable name. The warning message that will be displayed is represented by message key "smw-property-name-reserved" in namespace "MediaWiki".
Default setting[edit]
$smwgPropertyReservedNameList => array(
'Category',
'smw-property-reserved-category'
);
This means that by default "Category" is reserved and should not be used as a property name.2 "smw-property-reserved-category" is the message key in namespace "MediaWiki" that holds the translatable name of the reserved name which is matched against the property name. For example if the content language is Japanese (ja) then Category as the canonical form is blocked but also カテゴリ since this is the reserved name in the corresponding language.
Changing the default setting[edit]
To modify this configuration parameter, add one of the following lines to your "LocalSettings.php" file after the enableSemantics()
call:
- Make "Code" a reserved name too with the translatable name maintained at "MediaWiki:Smw-property-reserved-code"
$smwgPropertyReservedNameList = array_merge(
$smwgPropertyReservedNameList, [
'Code',
'smw-property-reserved-code'
]
);
or alternatively
$smwgPropertyReservedNameList => array(
'Category',
'smw-property-reserved-category',
'Code',
'smw-property-reserved-code'
);
See also[edit]
- Help page on property naming
- Help page on property pages
- Help page on authority mode particularly create protection
References
- ^ Semantic MediaWiki: GitHub pull request gh:smw:2840
- ^ Semantic MediaWiki: Sandbox example sb:smw:2840