Last modified: 2011-06-07 14:19:27 UTC
SMW supports the printout of additional data for each result of a semantic query. However, there are hardly any means to control the appearance of those printouts (e.g. to set a limit of values to be displayed, or to define the separator to be used). To allow more control of this part of query display, someone needs to propose how the user should enter these additional details. The current syntax of printouts is: ?property#unit = label where the "#unit" and " = label" parts are optional. "property" could also be a category or other type of input. The problem is that this general form already precludes the use of most symbols. For instance, you could no write ?property (limit=10) to set a limit for the results of this printout, since it is possible that a property page really is called "property (limit=10)". Until there is a proposal for this, no progress on allowing more parameters can be made.
How about we put the printout modifiers at the end of the query? Like this: {{ #ask: [[...]] | ?Property X | ?Property Y | ?Property Z | #unit=€,decplaces=2 | #unit=km | #dateformat=Y-m-d }}
Denny already had a proposal for this recently: http://sourceforge.net/mailarchive/message.php?msg_name=A267219A-390C-4F23-8B3D-2598AA53172C%40aifb.uni-karlsruhe.de The best place to continue this discussion would therefore be this thread on the devel list.
This has now been implemented: additional parameters to individual ?printouts can be given by writing "|+ parameter=value" after the printout. Currently, there are parameters for limiting and ordering results ("limit=number" and "order=ascending/descending"), and special parameters for some printouts (e.g. format=table supports "align=right" and "align=center"). The bug remains open since these parameters do not work properly with Special:Ask yet: they are simply lost when clicking on "further results".