# \[Ticket 29\] When you collapse a branch in the admin page men

**URL:** <https://www.ruby-forum.com/t/ticket-29-when-you-collapse-a-branch-in-the-admin-page-men/95688>\
**Category:** Radiant CMS\
**Created:** [June 9, 2006, 10:03am UTC](https://www.ruby-forum.com/t/ticket-29-when-you-collapse-a-branch-in-the-admin-page-men/95688 "2006-06-09T10:03:39Z")\
**Posts on this page:** 5\
**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:** [June 9, 2006, 10:03am UTC](https://www.ruby-forum.com/t/ticket-29-when-you-collapse-a-branch-in-the-admin-page-men/95688/1 "2006-06-09T10:03:39Z")

</div>

\<\<showBranch.txt\>\>  
The attached is a new version of the showBranch function that should fix  
this up.

Couldn’t post it to the ticket - it redirected me to port 9007, which I  
couldn’t connect to.

---

<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:** [June 9, 2006, 1:43pm UTC](https://www.ruby-forum.com/t/ticket-29-when-you-collapse-a-branch-in-the-admin-page-men/95688/2 "2006-06-09T13:43:15Z")

</div>

The attachment didn’t show anything in the file.  
I did notice you got the code uploaded in the ticket.

I applied the code to the views/admin/page/index.rhtml file, but it  
doesn’t seem to fix the issue.

What am I missing in order for this to work?

Chris-

On Jun 9, 2006, at 4:00 AM, Daniel S. wrote:

> Radiant mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

Chris Corriveau: CTO of Genevate - P.O. Box 1829, North Falmouth,  
MA 02556  
contact | removed\_email\_address@domain.invalid - 508.564.5676 ext. 202 | toll free -  
866.GENEVATE  
Visit: [CapePropertySearch.com](http://CapePropertySearch.com) has graphs and trends on over 6,500+  
Cape Cod properties.

---

<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:** [June 13, 2006, 3:40am UTC](https://www.ruby-forum.com/t/ticket-29-when-you-collapse-a-branch-in-the-admin-page-men/95688/3 "2006-06-13T03:40:53Z")

</div>

> What am I missing in order for this to work?
> 
> Chris-

You were missing a more exacting ticket description 🙂

I originally interpreted “return” to mean when you re-expand the parent  
node. I’ve posted a new diff that saves the status of the nodes in a  
cookie and now maintains the expansion of nodes when you navigate away  
from the sitemap.

Daniel.

---

<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:** [June 13, 2006, 12:47pm UTC](https://www.ruby-forum.com/t/ticket-29-when-you-collapse-a-branch-in-the-admin-page-men/95688/4 "2006-06-13T12:47:49Z")

</div>

This sounds more like it!  
I will check out ticket 29.

Thanks,  
Chris-

On Jun 12, 2006, at 9:37 PM, Daniel S. wrote:

> from the sitemap.
> 
> Daniel.
> 
> * * *
> 
> Radiant mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

Chris Corriveau: CTO of Genevate - P.O. Box 1829, North Falmouth, MA  
02556  
contact | removed\_email\_address@domain.invalid - 508.564.5676 ext. 202 | toll free -  
866.GENEVATE

---

<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:** [June 13, 2006, 5:13pm UTC](https://www.ruby-forum.com/t/ticket-29-when-you-collapse-a-branch-in-the-admin-page-men/95688/5 "2006-06-13T17:13:33Z")

</div>

Daniel S. wrote:

> The attached is a new version of the showBranch function that should fix  
> this up.

I’ve reviewed your patch and am very impressed. Your code is concise an  
well written. I tweaked it a bit and attached my own patch.

I have the following requests:

- Make it remember the homepage’s expanded status
- Add unit tests for PageController#index for the @expanded\_rows assign

Excellent work so far. 🙂

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)
