#ask: syntax – "hl" printout highlighter

From semantic-mediawiki.org
< #ask: syntax elements
#ask: syntax elements#ask: syntax – "hl" printout highlighter
#ask: syntax details:
Syntax
#-hl
Description Allows to highlight search tokens within a result set1
Datatype support Datatype "Text "Holds text of arbitrary length
Component printout
Software Semantic MediaWiki
Since version Semantic MediaWiki 2.5.0 Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x.
Keyword search token · query token

The #-hl query printout highlighter of search tokens was introduced in Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x..

Rationale[edit]

Allows to define search highlighting1 which is done by adding the #-hl result formatter to the printout statement of the respective property.

Example[edit]

Syntax
{{#ask:
 [[Has description::~*tokens*]]
 |?Has description#-hl
 |mainlabel=-
 |link=none
 |headers=hide
}}
Result

Allows to highlight search tokens within a result setgh:smw:2253

Link

<sandbox.semantic-mediawiki.org>: More examples for this query parameter

See also[edit]

References

  1. a b  Semantic MediaWiki: GitHub pull request gh:smw:2253