$smwgShowFactbox

From semantic-mediawiki.org


Configuration parameter details:
Name $smwgShowFactbox
Description Sets in which cases the factbox should be shown below a page
Default setting See below
Software Semantic MediaWiki
Since version
Until version still available
Configuration Facts display · Interface settings
Keyword factbox


$smwgShowFactbox is a configuration parameter that sets in which cases the factbox should be shown below a page. The configuration parameter was introduced in Semantic MediaWiki 0.7Released on 28 April 2007 and compatible with MW 1.8.x - 1.10.x..

The behaviour switches __SHOWFACTBOX__ and __HIDEFACTBOX__ can be used to control the display of the factbox on individual pages.
Starting with Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x. this parameter accepts a plain string value instead of the SMW_FACTBOX_* constants. The constant form still works but is deprecated and will be removed in Semantic MediaWiki 8.0.0Released on an unknown date unknown versions of MediaWiki.1

Default setting

$smwgShowFactbox = 'hidden';

This means that the factbox is never shown.

Available options

The option enabled by default is highlighted in bold.
  • 'hidden' (formerly SMW_FACTBOX_HIDDEN) – Do not show factboxes
  • 'nonempty' (formerly SMW_FACTBOX_NONEMPTY) – Show factboxes only if they have some content
  • 'special' (formerly SMW_FACTBOX_SPECIAL) – Show factboxes only if they contain special properties
  • 'shown' (formerly SMW_FACTBOX_SHOWN) – Always show factboxes

Changing the default setting

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

Enable the factbox to be always shown if it is not empty
$smwgShowFactbox = 'nonempty';
Enable the factbox to be always shown
$smwgShowFactbox = 'shown';
Enable the factbox to be always shown if it contains special properties
$smwgShowFactbox = 'special';

Legacy constant form (deprecated since 7.0.0)

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 unknown versions of MediaWiki. Use the string form shown above instead. It is documented here for wikis still running the constant form.
$smwgShowFactbox = SMW_FACTBOX_HIDDEN;

See also

References

  1. ^  |  Semantic MediaWiki: GitHub pull request gh:smw:6791

Cookies help us deliver our services. By using our services, you agree to our use of cookies.