Page MenuHomePhabricator

Support parameters to control details of query printouts
Closed, DeclinedPublic

Description

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.


Version: unspecified
Severity: enhancement

Details

Reference
bz16571

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:29 PM
bzimport set Reference to bz16571.

mail wrote:

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".

Aklapper subscribed.

The Semantic MediaWiki developers requested in https://phabricator.wikimedia.org/T64114 to move their task tracking to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues and to close remaining tasks in Wikimedia Phabricator. If you still face the problem reported in this task in a supported version of SMW, please feel free to transfer your report to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues . We are sorry for the inconvenience.