Ok, I found out a better solution. Using <%= yield :side_panel %> in
main layout and

<% content_for :side_panel do %><%= render :partial =>
'side_panel_show', :object_topass => @object_topass %><% end %>

On Sep 1, 9:53 am, Christian Fazzini <[email protected]>
wrote:
> Just wondering. Should sidebars be in the view or in the main layout?
>
> If they are in the main layout. i.e. with the following code:
>
>       <div class="span-24">
>
>         <div id="content" class="span-18">
>
>             <%= yield %>
>
>         </div>
>
>         <div id="side-panel" class="span-6 last">
>
>             sidebar
>
>         </div>
>
>       </div>
>
> If the sidebar has dynamic content (i.e. data being set from the
> action), how can this be displayed? So I am thinking that the sidebar
> must be in the action's view.
>
> What are your thoughts? What is the rails way of doing this? Or
> perhaps, is there a plugin that one can use?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to