# Manual page sorting in admin view

**URL:** <https://www.ruby-forum.com/t/manual-page-sorting-in-admin-view/69834>\
**Category:** Radiant CMS\
**Created:** [September 24, 2006, 9:26pm UTC](https://www.ruby-forum.com/t/manual-page-sorting-in-admin-view/69834 "2006-09-24T21:26:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_von\_Schwerdtner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/cc9497/32.png) [@Tom\_von\_Schwerdtner](https://www.ruby-forum.com/u/Tom_von_Schwerdtner)\
**Post date:** [September 24, 2006, 9:26pm UTC](https://www.ruby-forum.com/t/manual-page-sorting-in-admin-view/69834/1 "2006-09-24T21:26:25Z")

</div>

This in part comes from my desire (like others) to generate tree-style  
navigation for a website, and (personally) to improve generated  
sitemaps. This might introduces more complication than the end-result  
warrants, but I’ll toss it out there anyway.

What I’m thinking about (and unskillfully hacking at) is the ability  
to manually sort the admin view via DnD and to have \<r:children\> use  
this ordering. After some poking around, it looks like it would  
require these changes:

1. A new ‘position’ column in the pages table.
2. upon creation, a page would be given a position of  
parent.children.count - any virtual pages. This would put new pages  
at the botom of the list (instead of placing them by title).
3. upon page deletion, any siblings with greater position would need  
that value decremented
4. a reposition method
5. tweaks to the page index view to allow the re-ordering, and some  
kinda no-JS fallback up/down arrows.

There is quite likely more code it would touch… so I ask: does  
anyone want this and would it be worth it?

-Tom

---

<div class="post-metadata">

**Author:** ![Tom\_von\_Schwerdtner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/cc9497/32.png) [@Tom\_von\_Schwerdtner](https://www.ruby-forum.com/u/Tom_von_Schwerdtner)\
**Post date:** [September 24, 2006, 9:46pm UTC](https://www.ruby-forum.com/t/manual-page-sorting-in-admin-view/69834/2 "2006-09-24T21:46:29Z")

</div>

I think anyone would like that (me for sure). There was some talk of dnd  
ordering in the list some time ago, check the archives, and it was  
mostly  
positive talking 🙂

2006/9/24, Tom von Schwerdtner [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![Tom\_von\_Schwerdtner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/cc9497/32.png) [@Tom\_von\_Schwerdtner](https://www.ruby-forum.com/u/Tom_von_Schwerdtner)\
**Post date:** [September 24, 2006, 10:28pm UTC](https://www.ruby-forum.com/t/manual-page-sorting-in-admin-view/69834/3 "2006-09-24T22:28:33Z")

</div>

On 24/09/06, Tom von Schwerdtner [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> generate tree-style navigation for a website  
> …  
> improve generated sitemaps  
> …  
> sort the admin view via DnD and \<r:children\> use this ordering.

Those 3 features sound awesome and very useful IMO. The Drag-n-Drop  
feature would be an interface nicety even if it didn’t do anything  
practical! 🙂

Would you be using scripalicious for this or another JS library?

–  
Regards,  
Dave

---

<div class="post-metadata">

**Author:** ![Tom\_von\_Schwerdtner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/cc9497/32.png) [@Tom\_von\_Schwerdtner](https://www.ruby-forum.com/u/Tom_von_Schwerdtner)\
**Post date:** [September 24, 2006, 11:08pm UTC](https://www.ruby-forum.com/t/manual-page-sorting-in-admin-view/69834/4 "2006-09-24T23:08:41Z")

</div>

On 9/24/06, Dave C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Would you be using scripalicious for this or another JS library?

scriptalicious, but I’m new to Rails so maybe I just don’t know any  
better 🙂

-Tom

---

<div class="post-metadata">

**Author:** ![Tom\_von\_Schwerdtner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/cc9497/32.png) [@Tom\_von\_Schwerdtner](https://www.ruby-forum.com/u/Tom_von_Schwerdtner)\
**Post date:** [September 24, 2006, 11:16pm UTC](https://www.ruby-forum.com/t/manual-page-sorting-in-admin-view/69834/5 "2006-09-24T23:16:42Z")

</div>

There is a patch for this, actually two I believe, but it is a little  
rough around the edges. For one thing, it breaks the CSS for the  
Snippets and Layouts pages, though this is easily fixed. I have used  
this patch on pretty much every site lately, as it makes them much  
nicer to use.

Here is a link: [http://dev.radiantcms.org/radiant/ticket/199](http://dev.radiantcms.org/radiant/ticket/199)

If in anyone is interested in cleaning the patch up and trying to get  
it into the core, I would be willing to help. I have most of the CSS  
problems solved, but have not looked at the second reparenting patch.  
The biggest problem is switching John’s very nice table over to an  
unordered list, but this is accomplished in the patch. The entire  
page index page needs to be changed, but this work is mostly done.

Keith B.
