How to change the default ordering to a custom field

From JReviews Documentation
Revision as of 10:52, 23 August 2011 by Jreviews (Talk | contribs)

Jump to: navigation, search

JReviews 2.3

To set the default ordering to a custom field, go the JReviews Global Configuration, tab List page and enter the name of the field here:

FieldOrdering1.png


If you want to do that for certain listing types only, go to the Listing Type Manager, edit your listing type and set the field name here:

FieldOrdering2.png


JReviews 2.2

Edit /components/com_jreviews/jreviews/controllers/my_controller.php

In the beforeFilter function add the line shown below to override the global setting:

function beforeFilter() 
    {    
         $this->Config->list_order_default = 'jr_price';

Replace jr_price with the name of your field. If you want descending order, use rjr_price.