# Can someone help me with 'render partial' from a link?

**URL:** <https://www.ruby-forum.com/t/can-someone-help-me-with-render-partial-from-a-link/114010>\
**Category:** Rails\
**Created:** [September 7, 2007, 3:00am UTC](https://www.ruby-forum.com/t/can-someone-help-me-with-render-partial-from-a-link/114010 "2007-09-07T03:00:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![combas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@combas](https://www.ruby-forum.com/u/combas)\
**Post date:** [September 7, 2007, 3:00am UTC](https://www.ruby-forum.com/t/can-someone-help-me-with-render-partial-from-a-link/114010/1 "2007-09-07T03:00:20Z")

</div>

What I am trying to achieve is to create a sidebar exactly like the one  
on the left of this forum, but instead of showing all the links, there  
would be a ‘+’ sign next to each heading where you can click to see the  
links for that section. I am thinking render :partial is the best way to  
do this but I’m not sure the best way to implement it.

My assumptions are:

1. I need a file ‘sidebar.rhtml’ that is rendered in a forum page. This  
file will have the list of headings and link\_to\_remote calls into the  
forum controller.

2. In the forum controller I need a function along the lines of  
‘expand\_list’ which then calls render :partial for a given list (can I  
base which list is used on the :id param from the link\_to\_remote call?  
if so how?). Each list will have a partial file - i.e. \_list1.rhtml,  
\_list2.rhtml, …

3. In the ‘forum’ subfolder of views I should have each of the partials  
and they will look like this:

- [Forum 1](https://www.ruby-forum.com/forum/1)
- [Forum 2](https://www.ruby-forum.com/forum/2)

Does this sound correct? Am I missing anything? I tried to do the above  
but kept getting parse errors when rendering the partials. Can someone  
give me an example of how I should setup sidebar.rhtml to do the  
link\_to\_remote calls? I am confused about how I should be using the  
:update parameter and also :id if it is needed.

Thanks,  
-Alex
