# Giving more structure to the admin tree

**URL:** <https://www.ruby-forum.com/t/giving-more-structure-to-the-admin-tree/114761>\
**Category:** Radiant CMS\
**Created:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/giving-more-structure-to-the-admin-tree/114761 "2007-09-17T13:25:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/giving-more-structure-to-the-admin-tree/114761/1 "2007-09-17T13:25:15Z")

</div>

> list of years which expand into months).  
> And since I was inspired:

[http://soxbox.no-ip.org/random\_crap/admin\_tree\_structure.diff](http://soxbox.no-ip.org/random_crap/admin_tree_structure.diff)

Looks something like:

[http://soxbox.no-ip.org/random\_crap/admin\_tree\_structure.png](http://soxbox.no-ip.org/random_crap/admin_tree_structure.png)

Basically, it gives a hook for pages to return their children  
in a manner fit for the admin interface. In this case, instead  
of returning an actual page, the ArchivePage returns dummy  
pages that in turn return parts of the child list.

Code is a little more awkward than I’d like (mainly just in  
archive\_page.rb, the rest is pretty clean), but it works.

Doesn’t lead itself to extension bundling as it needs to make  
a change to one of the js files.

I was thinking maybe that tree\_children and tree\_child(slug)  
might be a more appropriate way of performing find\_by\_url -  
in that way the tree that you see in the admin interface has  
a 1:1 relationship with each part of the slug.

Dan.
