# Arbitrary sort order for children

**URL:** <https://www.ruby-forum.com/t/arbitrary-sort-order-for-children/113141>\
**Category:** Radiant CMS\
**Created:** [August 28, 2007, 1:43am UTC](https://www.ruby-forum.com/t/arbitrary-sort-order-for-children/113141 "2007-08-28T01:43:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wonko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/8dc957/32.png) [@wonko](https://www.ruby-forum.com/u/wonko)\
**Post date:** [August 28, 2007, 1:43am UTC](https://www.ruby-forum.com/t/arbitrary-sort-order-for-children/113141/1 "2007-08-28T01:43:45Z")

</div>

Hi,

I am developing a radiant powered web site for a class that I am going  
to teach that initially has three levels of pages in the parent-child  
hierarchy, the home page, lessons, lesson-parts.

I would like to be able to change the order of the lessons arbitrarily.  
For example, when I add a lesson that goes in the middle of the class  
schedule, or if I didn’t create the lessons in the same order that they  
should appear in the class.

Would I have to add a sort\_order attribute to the pages model in order  
to do something like this? I couldn’t figure out a way to leverage the  
existing attributes of the page model for sorting that would order the  
children the way I want.

Thanks,

Ryan

---

<div class="post-metadata">

**Author:** ![wonko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/8dc957/32.png) [@wonko](https://www.ruby-forum.com/u/wonko)\
**Post date:** [August 28, 2007, 2:06am UTC](https://www.ruby-forum.com/t/arbitrary-sort-order-for-children/113141/2 "2007-08-28T02:06:44Z")

</div>

Ryan,

You can do this with the reorder extension, but IIRC it is somewhat  
experimental.

Sean

---

<div class="post-metadata">

**Author:** ![wonko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/8dc957/32.png) [@wonko](https://www.ruby-forum.com/u/wonko)\
**Post date:** [August 28, 2007, 7:55pm UTC](https://www.ruby-forum.com/t/arbitrary-sort-order-for-children/113141/3 "2007-08-28T19:55:11Z")

</div>

> -----Original Message-----  
> From: Sean C.  
> Sent: Monday, August 27, 2007 8:06 PM  
> Subject: Re: [Radiant] Arbitrary sort order for children
> 
> You can do this with the reorder extension, but IIRC it is somewhat  
> experimental.

I’ve found it to work well, but the Ye Olde problem of only having one  
plugin able to modify the page list causes problems, e.g. you can’t use  
it if you already have the copymove extension installed.

Damien McKenna  
Web D.  
The LIMU Company

---

<div class="post-metadata">

**Author:** ![wonko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/8dc957/32.png) [@wonko](https://www.ruby-forum.com/u/wonko)\
**Post date:** [August 30, 2007, 5:21am UTC](https://www.ruby-forum.com/t/arbitrary-sort-order-for-children/113141/4 "2007-08-30T05:21:42Z")

</div>

very cool. Thanks for the responses.  
I have loaded the extension and it works nicely. As for Ye Olde  
extension problem, the README for the reorder says it is supposed to be  
incorporated into the base Radiant CMS in version 0.6.1.
