$smwg­Result­Formats­Features

From semantic-mediawiki.org


Configuration parameter details:
Name $smwgResultFormatsFeatures
Description Sets whether features for some result formats should be extended
Default setting See below
Software Semantic MediaWiki
Since version
Until version still available
Configuration Special Ask
Keyword ask queries · separator parameter · template format


$smwgResultFormatsFeatures is a configuration parameter that defines whether features for some result formats should be extended. The configuration parameter was introduced in Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x..1

This configuration parameter is meant to assist in migrating from the pre Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x. behaviour by allowing to gain more time to do the actual migration. However it is strongly recommended to migrate since Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x. brought many improvements concerning the separation of outputs of a query.

The changed behaviour also resolves inconsistencies and ambiguity with the sep parameter2 in connection with result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).. This is accomplished by additionally introducing more parameters for separating outputs:3

This configuration parameter was applicable to result format "Template"Uses a specified template to format and display the results prior to the list and template format rework that came with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. and additionally brought the propsep separator.4
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 ('template-outsep' or 'none') instead of the SMW_RF_* 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..5

Default setting[edit]

$smwgResultFormatsFeatures = 'template-outsep';

This means that result format "Template"Uses a specified template to format and display the results is extended by the valuesep parameter.

Available options[edit]

  • 'none' (formerly SMW_RF_NONE) – Disables all result format features
  • 'template-outsep' (formerly SMW_RF_TEMPLATE_OUTSEP) – Set that the "sep" parameter should be used as outer separator for result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).

Changing the default setting[edit]

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

Disable this enhancement of result formats features related to result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).6
$smwgResultFormatsFeatures = 'none';

This setting allows to retain the behaviour prior to Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x. mostly to gain time for the migration to the new parameters.

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 form shown above instead. It is documented here for wikis still running the constant form.
$smwgResultFormatsFeatures = SMW_RF_TEMPLATE_OUTSEP;

To disable the feature with the constant form:

$smwgResultFormatsFeatures = SMW_RF_NONE;

See also[edit]

  • Help page on parameter sep to result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).
  • Help page on parameter propsep to result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).
  • Help page on parameter valuesep to result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).



References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:2331
  2. ^  Semantic MediaWiki: GitHub pull request gh:smw:2022
  3. ^  Semantic MediaWiki: Sandbox example sb:smw:2331
  4. ^  Semantic MediaWiki: GitHub pull request gh:smw:3130
  5. ^  | | | |  Semantic MediaWiki: GitHub pull request gh:smw:6792
  6. ^  Semantic MediaWiki: GitHub issue gh:smw:2329