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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...