Tuesday, August 31, 2010

[Rails] Sidebars should be placed in the main layout or the action's view

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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate