#ask: syntax – "control" query marker

From semantic-mediawiki.org
< #ask: syntax elements
#ask: syntax elements#ask: syntax – "control" query marker
#ask: syntax details:
Syntax
@control
Description Allows to dynamically alter a result display without the need to reload a page1
Datatype support All datatypes
Component query marker
Software Semantic MediaWiki
Since version Semantic MediaWiki 3.0.0 Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x.
Keyword deferred query · dynamic query

The @control query marker was introduced in Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..

Rationale[edit]

The @control marker allows to dynamically alter a result display without the need to reload a page (where the parser cache is not in effect) and at the same time provides dynamic up-to-date results for pages with inline queries (via the #ask parser function). At the moment it necessarily uses an option which is called slider, i.e. @control=slider.

Only queries using the @deferred query marker1 support the usage of the @control query marker.

Example[edit]

Syntax
{{#ask:
 [[Category:Foo]]
 |?Bar
 |link=none
 |@deferred
 |@control=slider
}}

or

{{#ask:
 [[Category:Foo]]
 |?Bar
 |link=none
 |@deferred
 |@control=slider
}}
Link

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

See also[edit]

References

  1. a b  Semantic MediaWiki: GitHub pull request gh:smw:2398 (Add support for @deferred mode)