Help:Inline queries/The "hash"show parser function
Talk0this wiki
< Help:Inline queries
Subpages of the main Help page: * 1 /Introduction to "hash"ask
* 2 /The "hash"show parser function
* 3 /Standard parameters for inline queries **3.1 /Result limits and links to further results **3.2 /Introduction and default text **3.3 /Sorting results **3.4 /Configuring labels or table headers **3.5 /Changing the first result column * 4 /Result formats * 5 /Exporting query results: RSS, etc. * 6 /Using templates for custom formatting
A common usage of queries is to display only a single property value for a single page. For example, one could insert the population of Berlin into some article, and use a query instead of manual copying to achieve this. SMW has a special shortcut to make such queries simpler. For example, one can write
{{#show: Berlin | ?population}}
to display the population of Berlin (Result: «»). The function otherwise works like an inline query, and all parameters available for inline queries can also be used on #show if desired. The above function can also be written as an #ask query as follows:
{{#ask: [[Berlin]] | ?population = }}
Here the equality symbol assigns another label for displaying the property, and this label is empty. Without this, the result would display «Population:» before the actual number.
| This page uses content from the Semantic MediaWiki website. The original content was at Help:Inline queries. The list of authors can be seen in the page history there. The documentation portion of the content of Semantic MediaWiki is available under Creative Commons 3.0 licensing. |