How to change the default ordering to a custom field

From JReviews Documentation
Revision as of 01:49, 27 March 2010 by Alejandro (Talk | contribs)

Jump to: navigation, search

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.