Jump to content
Sign in to follow this  
Guest Ann

Sorting properties on date created (not on ID) ?

Recommended Posts

Guest Ann

Hi there,

 

JomEstate property lists are displayed sorted by "latest" by default but that "latest" actually is the auto-incremented ID of the property and not the "date created" field for that property.

 

I need to display properties in a specific order and I could do that using the "date created" field.

How can I modifiy the sorting so that "latest" actually sorts the "date created" field and not the "ID" field ?

 

Thanks in advance.

Cheers,

Share this post


Link to post
Share on other sites
Guest Ann

Found it!

 

Modified the file search.php in com_jomestate/models as follows:

replace line 74:

if ($sort == 1) $sort = 'ads.featured DESC, ads.id DESC';

by

if ($sort == 1) $sort = 'ads.featured DESC, ads.date_created DESC';

 

Cheers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×