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

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr 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 
Posted
Rating:
#51739 (In Topic #11294)
Avatar

Fan in action

Sort catalogue entry dates by add_date

Hi,

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?

Cheers,

a
Back to the top
 
Posted
Rating:
#51827
Avatar

Community saint

midoriberlin,

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
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: