Help:Adding specific pages to an inline query
From semantic-mediawiki.org
Semantic extension(s): | Semantic MediaWiki |
Further extension(s): | -/- |
Keyword(s): | -/- |
Description:
- This is a draft version.
1. Use OR
{{#ask: [[Category:…]] [[<Property name>::<Property value>]] OR [[<Page A>]] OR [[<Page B>]] |…
Note, however, that too many pages separated by OR will result in an error, as it simply throws up a long list of pages.
2. Use Semantic Compound Query (SCQ)
See http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries
Note that SCQ can work with parser functions in the following manner, making it fit for use in templates:
{{#if: {{{A|}}} {{{B|}}} {{{C|}}}|<br/>{{ #compound_query: {{#if: {{{A|}}}|[[{{{A|}}}]]}} … | {{#if: {{{B|}}}|[[{{{B|}}}]]}} … | {{#if: {{{C|}}}|[[{{{C|}}}]]}} …. |format=template |template=<…> }}}}
(The query will work fine if A, B or C is empty)