Author: mitchell_neill
Description:
Hi.
I have a number of queries that I use on a lot of pages. Rather than put the query into every page, it would be much easier to create a template with the query in it and then pass in the required parameters.
An example using the cities theme.
I have a cities query that is used on a number of pages. So in each page that uses it I simply have:
{{City Query|Berlin}} (or whatever city I want - this is a trivial example).
The City Query template contains:
{{#ask:
[[Category:Cities]]
[[City::{{{1|}}}]]
?Population |
?Mayor |
?Size |
?Twinned with |
?Has a river |
}}
However, {{City Query|Berlin}} throws the error:
"The part "]]" of the query was not understood. Results might not be as
expected."
and the ask returns all cities in the cities category, not just Berlin.
Surely this is just a simple passing issue that can be easily fixed?
It would be very powerful to be able to pass in parameters to a query like this and would also result in cleaner pages without duplicating almost identical queries everywhere.
I am using SMW 1.5.1.
Version: unspecified
Severity: major