Order by date for archive page types

Is there a way to order child pages of an archive page type by the
publish date? Its currently ordered alphabetically.

And I mean the list of pages in the admin interface…

I would also like to know the answer to this.

Arik J. wrote:

Is there a way to order child pages of an archive page type by the
publish date? Its currently ordered alphabetically.

Or what about ordering in general? I want to do an <r:children:each>
loop but I want the admin to be able to choose the order. The admin
seems to lack any sort of page sorting functionality.

So, manual or automatic, how is this done?

Thats great and all, but I think people are more concerned about
ordering in the admin, not in your public pages as that option is
already there. But thanks though.

David P. wrote:

Alex W. wrote:

Or what about ordering in general? I want to do an <r:children:each>
loop but I want the admin to be able to choose the order. The admin
seems to lack any sort of page sorting functionality.

So, manual or automatic, how is this done?

The following will let you determine the page order in front-end
(non-admin) page listings. The key here is that the ‘by’ field refers to
a database field, not the equivalent Radiant tag (for example,
‘published_at’ vs ‘date’)…

<r:children:each order=‘desc’ by=‘published_at’ status=‘published’>

</r:children:each>

  • Dave

However, using the Reorder extension (non-ajax), it automatically places
new pages at the top of list. Its not exactly what I’m looking for as it
uses the position field in the pages table to determine ordering. But it
works great when you’re starting your archive from scratch.

Alex W. wrote:

Or what about ordering in general? I want to do an <r:children:each>
loop but I want the admin to be able to choose the order. The admin
seems to lack any sort of page sorting functionality.

So, manual or automatic, how is this done?

The following will let you determine the page order in front-end
(non-admin) page listings. The key here is that the ‘by’ field refers to
a database field, not the equivalent Radiant tag (for example,
‘published_at’ vs ‘date’)…

<r:children:each order=‘desc’ by=‘published_at’ status=‘published’>

</r:children:each>

  • Dave

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs