Reviews filter
Swarm review sorting on the Reviews list page is customized by using the following configuration block in the SWARM_ROOT/data/config.php
file:
<?php
// this block should be a peer of 'p4'
'reviews' => array(
'filters' => array(
'result_sorting' => true,
'date_field' => 'updated', // 'created' displays and sorts by created date,'updated' displays and sorts by last updated
),
),
result_sorting
Controls whether the Result order button is displayed on the Reviews list page.
- Set
result_sorting
totrue
to display the Result order button on the Reviews list page, this is the default setting. - Set
result_sorting
tofalse
to remove the Result order button from the Reviews list page, reviews are sorted by when they were created.
date_field
The date_field
setting is only used if result_sorting
is set to true
.
date_field
sets the initial setting for the Result order button on the Reviews list page.
created
: reviews are sorted by when they were created. This is the default setting.updated
: reviews are sorted by when they were last updated.
When a user starts a new session the Result order button is set to the initial sort order set in date_field
. The review sort order can be changed by the user from the Result order button. This setting is remembered even if the user navigates away from the Reviews list page. When the user starts a new session, the Result order button is reset back to the setting in date_field
.