Ruby Forum Radiant CMS > Order by date for archive page types

Posted by Arik Jones (imakethings)
on 14.04.2008 03:40
Is there a way to order child pages of an archive page type by the
publish date? Its currently ordered alphabetically.
Posted by Arik Jones (imakethings)
on 14.04.2008 04:53
And I mean the list of pages in the admin interface...
Posted by Ben Morrow (benmorrow)
on 25.04.2008 16:23
I would also like to know the answer to this.
Posted by Alex Wayne (squeegy)
on 25.04.2008 18:31
Arik Jones 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?
Posted by David Piehler (davidpiehler)
on 25.04.2008 19:24
Alex Wayne 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
Posted by Arik Jones (imakethings)
on 28.04.2008 06:02
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 Piehler wrote:
> Alex Wayne 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
Posted by Arik Jones (imakethings)
on 28.04.2008 06:05
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.