$smwgBrowseFeatures

From semantic-mediawiki.org


Configuration parameter details:
Name $smwgBrowseFeatures
Description Sets the behaviour of the features provided by several browsing interfaces
Default setting See below
Software Semantic MediaWiki
Since version
Until version still available
Configuration Interface settings · Facts display
Keyword special page · browsing · interface


$smwgBrowseFeatures is a configuration parameter that sets the behaviour of the features provided by several browsing interfaces. The configuration parameter was introduced in Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x.1 and deprecated the configuration parameters as indicated in the section on available options below.

Starting with Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x. this parameter accepts an array of plain string keys instead of the SMW_BROWSE_* constants. The constant form still works but is deprecated and will be removed in Semantic MediaWiki 8.0.0Released on an unknown date and compatible with unknown versions of MediaWiki..2

Default setting[edit]

$smwgBrowseFeatures = [ 'toolbox-link', 'show-incoming', 'show-group', 'use-api' ];

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

Available options[edit]

The options enabled by default are highlighted bold.
  • 'toolbox-link' (formerly SMW_BROWSE_TLINK) – Sets that the toolbox of each content page shows a link to browse the properties of that page using special page "Browse"Shows all properties and their values annotated to a page
NoteNote: This option replaces configuration parameter $smwgToolboxBrowseLinkSets whether the toolbox in the wiki's sidebar will show a link to special page special page "Browse".
  • 'show-inverse' (formerly SMW_BROWSE_SHOW_INVERSE) – Sets that the browse view for incoming links on special page special page "Browse"Shows all properties and their values annotated to a page should show the incoming links inverse to the reverse view
NoteNote: This option replaces configuration parameter $smwgBrowseShowInverseSets whether the browse view for incoming links on special page special page "Browse" should show the incoming links inverse to the reverse view.
  • 'show-incoming' (formerly SMW_BROWSE_SHOW_INCOMING) – Sets that the browse view for incoming links on special page "Browse"Shows all properties and their values annotated to a page should show the incoming links
NoteNote: This option replaces configuration parameter $smwgBrowseShowAllSets whether the browse view for incoming links on special page special page "Browse" should show the incoming links.
  • 'show-group' (formerly SMW_BROWSE_SHOW_GROUP) – Sets that the view of created group sections shows for properties that belong to the same property group3
  • 'show-sortkey' (formerly SMW_BROWSE_SHOW_SORTKEY) – Sets that sortkey influenced by the magic words DISPLAYTITLE, DEFAULTSORT etc. should be shown4
  • 'use-api' (formerly SMW_BROWSE_USE_API) – Sets that the browse display is to be generated using an API request
NoteNote: This option replaces configuration parameter $smwgBrowseByApiSets whether the display of special page "Browse" will be generated using an API request.
For further information on the available options listed above see the documentation pages of the respective deprecated configuration parameters as stated above.

Changing the default setting[edit]

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

Removing a specific browsing feature

To disable a specific feature e.g. that the toolbox of each content page shows a link to browse the properties of that page using special page "Browse"Shows all properties and their values annotated to a page just redefine the configuration parameter without including the corresponding string as shown in the above section on available options:

$smwgBrowseFeatures = [ 'show-incoming', 'show-group', 'use-api' ];
Adding a specific browsing feature

To enable a specific feature e.g. incoming links on special page special page "Browse"Shows all properties and their values annotated to a page should show the incoming links inverse to the reverse view, just redefine the configuration parameter including the corresponding string as shown in the above section on available options:

$smwgBrowseFeatures = [ 'toolbox-link', 'show-incoming', 'show-group', 'use-api', 'show-inverse' ];
Disabling all browsing features

To disable all browse features set an empty array:

$smwgBrowseFeatures = [];

Legacy constant form (deprecated since 7.0.0)[edit]

The constant form below is deprecated since Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x. and will be removed in Semantic MediaWiki 8.0.0Released on an unknown date and compatible with unknown versions of MediaWiki.. Use the string-array form shown above instead. It is documented here for wikis still running the constant form.

The default expressed with constants:

$smwgBrowseFeatures = SMW_BROWSE_TLINK | SMW_BROWSE_SHOW_INCOMING | SMW_BROWSE_SHOW_GROUP | SMW_BROWSE_USE_API;

A specific feature can be removed with a bit-operation, e.g.:

$smwgBrowseFeatures = ( $smwgBrowseFeatures & ~SMW_BROWSE_TLINK );
NoteNote: Please use parentheses5 when combining different bit-operations to avoid a possible mismatch.

To disable all browsing features with the constant form, use SMW_BROWSE_NONE:

$smwgBrowseFeatures = SMW_BROWSE_NONE;

See also[edit]


References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:2799
  2. ^  | | | | | | | | |  Semantic MediaWiki: GitHub pull request gh:smw:6793
  3. ^  Semantic MediaWiki: GitHub pull request gh:smw:2874
  4. ^  Semantic MediaWiki: GitHub pull request gh:smw:2922
  5. ^  Bitwise Operators to use parentheses to ensure the desired precedence ...