Help:Configuration parameter "$smwgCategoryFeatures"

From semantic-mediawiki.org
Jump to: navigation, search
edit with form


Title $smwgCategoryFeatures
Description Sets the behaviour of the query features related to category handling
Default setting See below
Software Semantic MediaWiki
First version supported
Last version supported still available
Configuration Query settings
Keyword category

$smwgCategoryFeatures is a configuration parameter that sets the behaviour of the query features related to category handling. The setting was introduced in Semantic MediaWiki 3.0.0Released on an unknown date and compatible with MW 1.27.0 - 1.30.x.1 and deprecated the configuration parameters as indicated in the section on available options below.

The deprecated configuration settings as indicated in the section on available options should be migrated to this configuration setting in "LocalSettings.php" since they will be removed with the release of Semantic MediaWiki 3.1.0Released on an unknown date and compatible with unknown versions of MediaWiki. in late 2018.1

Default setting

$smwgCategoryFeatures = SMW_CAT_REDIRECT | SMW_CAT_INSTANCE | SMW_CAT_HIERARCHY;

This means that the three respective features as explained in the following sections on available options are enabled.

Available options

For further information on the available options listed above see the documentation pages of the respective deprecated configuration parameters.

Changing the default setting

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

Removing a specific query feature related to category handling

To disable a specific feature e.g. that redirects on categories should be detected and used as annotation values just redefine the configuration parameter by defining it without including the corresponding constant as shown in the above section on available options:

$smwgCategoryFeatures = SMW_CAT_INSTANCE | SMW_CAT_HIERARCHY;

or alternatively remove the option from the existing definition of the configuration parameter like e.g.

$smwgCategoryFeatures = $smwgCategoryFeatures & ~SMW_CAT_REDIRECT;
Disabling all query features related to category handling

To disable all browse features just remove all constants as shown in the above section on available options:

$smwgCategoryFeatures = '';

or add the constant for disabling all category handling features

$smwgCategoryFeatures = SMW_CAT_NONE;

See also

References

  1. a b  Semantic MediaWiki: GitHub pull request gh:smw:2806