Help:Filtered format

The result format filtered, part of, displays results in switchable views and offers client-side (JavaScript based) filtering.

This result printer replaced starting with. Currently a list view (SRF 1.8.0 and later), a calender view (SRF 1.8.0 and later), a table view (SRF 2.3.0 and later), a map view (SRF 2.5.0 and later) and a number view (SRF 2.5.0 and later) are available. It is possible to switch between views. There are the value and distance filters available. The output may be templated. You can specify a different template for each view. See also the format specific README.

Usage
Syntax of the  call: (This is only a syntax example. For currently available features see the documentation of the various views and filters.)

number
Provides a numerical slider for the result set based upon a number type property.

distance
Provides a distance slider for the result set based upon a geographic coordinate type property. Additional parameters: It should be noted that if Google geocoding is used, this funtionality will result in a lot of API calls. Google has set a limit for the number of free geocodes per day of 2500. It is best to work using lat/long as this currently has no limit.

List View
Allows you to specify a template to format the results. This is the same as format=template in standard SMW queries See here for details.
 * list view template=

Example Queries
This will show a result set with Job Title, City and Country properties set as filters. Job Title filter will start collapsed and will have a scrollbar. City will start uncollapsed and will have a scrollbar. Country will have the AND/OR selector switched on and no scrollbar.

Example distance query
This will show a result set with Job Title, City and Country properties set as filters. There will be a distance slider visible that allows you to filter the results based on the distance from London, UK. This assumes each page has a geographic coordinate property set for each person.

Calendar View
This view outputs the query results into a calendar. For the format to work you need to specify the printout that contains the start date of an event. You can also specify the printout for the end label. It should look like that:

The 'calendar view start' parameter: If you do not specify the printout, the first date printout is used.

The 'calendar view end' parameter (optional): If the individual results span multiple days, you can specify the end date. The output will then be drawn as a bar between the start and end dates of each result.

'calendar view title' parameter (optional). This names the printout to be used as a title of an event in the calendar. If you do not specify this, the first wikipage printout in the result is taken, which usually is result object itself.

'calendar view title template' parameter (optional): Allows you to specify a template to format the results.

Table View
This view outputs the query result as sortable table (available since SRF 2.3.0).

Map View
This view outputs the query result on am map (available since SRF 2.5.0). The Maps extension is not required for this to work.CiteRef::gh:srf:239

Configuration parameter  must be set in the "Localsettings.php" file to specify the used map:

A list of available providers is can be found here.

Switching Views
You can specify several views and will be able to switch between them. The call looks something like this:

In the 'views' parameter you can specify the label, that should be put on the selector tab for the respective view.

Skinning
The filters can be skinned. The default CSS is contained in the skins folder of the extension. The default CSS presents the filters horizontally across the page with the result set below.

The following example CSS presents the filters appearing stacked on the left with the result set on the right:

Here is example CSS for the collapse controls:

Example CSS required for the scrollbars:

Sponsorship
This extension is sponsored by Prescient Software and KDZ - Centre for Public Administration Research.