Template:SMW countries: Difference between revisions

From OLPC
Jump to navigation Jump to search
(try doing Template:Countries with a query.)
 
(improve documentation)
 
Line 73: Line 73:


<br clear="all" />
<br clear="all" />
To do so, query for [[:Category:Deployments]] and [[Property:Number of laptops]] (to filter out pages in that category that don't have deployment information).
To do so, query for [[:Category:Deployments]] and [[Property:Number of manufactured laptops]] (to filter out pages in that category that don't have deployment information).


To make the query look even more like that, and to add the img link, you'd have to create [[Template:SMW_display_deployments-brief]] for each line of results, set link=none, and create the two links.
To make the query look even more like that, and to add the img link, you'd have to create [[Template:SMW_display_deployments-brief]] for each line of results, set link=none, and create the two links.


But we can get pretty close with a query in a div, as you can see below:
Let's try it.
----
Hmm, how did that go?


[[Category:Semantic MediaWiki]]
[[Category:Semantic MediaWiki]]

Latest revision as of 04:28, 5 January 2009

Try to do Template:Countries using a query instead of a long manually-maintained list of countries.

Result should look like this:


To do so, query for Category:Deployments and Property:Number of manufactured laptops (to filter out pages in that category that don't have deployment information).

To make the query look even more like that, and to add the img link, you'd have to create Template:SMW_display_deployments-brief for each line of results, set link=none, and create the two links.

But we can get pretty close with a query in a div, as you can see below:

{{#ask: Number of manufactured laptops::+

 |intro=Deployments 
What countries
have XOs?

|format=list |sep=

}}