How to change the default ordering to a custom field

From JReviews Documentation
Revision as of 14:01, 29 December 2009 by Alejandro (Talk | contribs) (Created page with 'Edit /components/com_jreviews/jreviews/controllers/my_controller.php In the beforeFilter function add the line shown below to override the global setting: <source lang="php"> f…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.