$smwgResultAliases

From semantic-mediawiki.org


Configuration parameter details:
Name $smwgResultAliases
Description Sets available aliases for result formats
Default setting See below
Software Semantic MediaWiki
Since version
Until version still available
Configuration Basic settings
Keyword result format · result printer


$smwgResultAliases is a configuration parameter that sets available aliases for result formats. It be redefined via the configuration to disallow certain aliases or to register extension aliases. The configuration parameter was introduced in Semantic MediaWiki 1.8.0Released on 2 December 2012 and compatible with MW 1.17.0 - 1.22.x
(except 1.22.1).
. Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. extended the configuration parameter by result aliases for result format "templatefile"Outputs results in arbitrary file formats defined via templates.1 and result format "plainlist"Outputs results in a comma separates list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).2.

Default setting[edit]

$smwgResultAliases => [
	'feed' => [ 'rss' ],
	'templatefile' => [ 'template file' ],
	'plainlist' => [ 'plain' ]
];

This means that result format "feed"Exports results as RSS and Atom feeds. can also be used by specifying rss for the format option of inline queries.

Changing the default setting[edit]

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

Disable the result alias rss for result format "Feed"Exports results as RSS and Atom feeds.
unset( $smwgResultAliases['rss'] );

This means that result format "feed"Exports results as RSS and Atom feeds. can no longer be used by specifying rss for the format option of inline queries. Disabled aliases will be treated like if the alias parameter had been omitted.

See also[edit]

  • Help page on result format "feed"Exports results as RSS and Atom feeds.
  • Help page on result format "templatefile"Outputs results in arbitrary file formats defined via templates.
  • Help page on result format "plainlist"Outputs results in a comma separates 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:3024
  2. ^  Semantic MediaWiki: GitHub commit gh:smw:404a886