HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS. ocPortal 9 is superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

Automatically sort catalogue listings by most recently added

Login / Search

 [ Join | More ]
 Add topic 
#51739 (In Topic #11294)

Fan in action

Sort catalogue entry dates by add_date


I'm wondering if there is a simple way of getting catalogue entries to automatically display in order of the most recently added?

I know there are blocks for "most recent 20" etc. and list all content but what I want is something that just alters the sorting of the default returned catalogue entries…anyone else had a need for this?

From what I've seen you can add sort parameters for fields in your catalogue but I cannot work out how to get the add_date added to that list. Had a look in catalogue.php and can see where various sort options are being set but I really would like to avoid having to code something into the PHP. Is there a way of achieving this with some sort of tempcode or url parameters?


Back to the top

Community saint


I have not tried this but I would try adding a new field and change the field type to Sequential Number, then set the Defines Order to Ascending or Descending and if you don't want to see that field then un-check the box Visible.

Rick Henson

OCP 4.3.2 & 5.0.1
PHP 5.2.5
MySQL 5.0.51a
FireFox 3.6.8
Back to the top
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: