SEARCH.php result : sort by latest by default

Hi,

Is it possible to sort by latest by default when we go to SEARCH.php

 

In search.php I tried to modify :

in the function showMatchProfiles($iBlockID) {

the line $sSort = isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 'none';

by  $sSort = isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 'date_reg';

but it didn't worked.

 

Is someone knows how to do it ?

Thanks

 

Quote · 14 Apr 2011

I found a simple solution :

 

In admin / Menu builder

I changed the URL of the search button

from : URL : search.php

 

to : URL : search.php?sort=date_reg

and it worked for me.

Quote · 14 Apr 2011

me too

Quote · 2 Apr 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.