$smwgUseCategoryHierarchy

From Linux Web Expert


Template:Interlanguagelink: en
Configuration parameter details:
Name $smwgUseCategoryHierarchy
Description Property "Has description" (as page type) with input value "Sets whether elements of the subcategory hierarchy are considered as hierarchy elements in the [[Help:Annotation|annotation process" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.
Default setting Has default::true
(Other) available settings
false

Allows to disable considering the subcategory hierarchy as hierarchy elements in the annotation process

Software Semantic MediaWiki
Since version
Until version still available
Configuration Query settings
Keyword category · subcategory · inclusion · category hierarchy · hierarchy inferencing


__NOBREADCRUMBLINKS__

$smwgUseCategoryHierarchy is a configuration parameter that sets whether Semantic MediaWiki should consider MediaWiki's subcategory hierarchy as hierarchy elements in the annotation process. The configuration parameter was introduced in Semantic MediaWiki 1.5.0Released on an unknown date unknown versions of MediaWiki and deprecated with Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki1.

This configuration parameter was deprecated with Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki in favour of option SMW_CAT_HIERARCHY to configuration parameter $smwgCategoryFeaturesSets the behaviour of the query features related to category handling streamlining the overall configuration of Semantic MediaWiki.1 Thus you are advised to migrate your settings in "LocalSettings.php" to the new configuration parameter since this one will be removed with the release of Semantic MediaWiki 3.1.0Released on an unknown date unknown versions of MediaWiki in 2019.

Default setting

$smwgUseCategoryHierarchy = true;

This means that subcategories will always be interpreted like subclasses and automatically annotated with special property "Subcategory of"Lets you explicitly indicate that one category is a subcategory of another, i.e. when querying all elements of "B" the result will also yield all elements of "A" if "A" is a subcategory of "B".

Changing the default setting

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

Disable considering the category hierarchy automatically during annotation
$smwgUseCategoryHierarchy = false;

This means that incoming links will not be interpreted like subclasses and automatically annotated with special property "Subcategory of"Lets you explicitly indicate that one category is a subcategory of another.

Subclass relationships can still be given explicitly by using special property "Subcategory of"Lets you explicitly indicate that one category is a subcategory of another on a category page. Only now such annotations will be shown in the factbox if it was enabled with parameter configuration parameter $smwgShowFactboxSets in which cases the factbox should be shown below a page.

See also

References

  1. a b gh:smw:2806