https://bugzilla.wikimedia.org/show_bug.cgi?id=24337

           Summary: Passing a template parameter into a query throws an
                    error
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: Normal
         Component: Semantic MediaWiki
        AssignedTo: [email protected]
        ReportedBy: [email protected]


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.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to