#ask: highlight search tokens

From semantic-mediawiki.org
Jump to: navigation, search
#ask: syntax elements#ask: highlight search tokens
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
First version supported 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

Rationale

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

Example

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

See also

References

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