On Saturday, May 21, 2011 1:29:44 AM UTC-6, egervari wrote: > > Basically I'd like to create a layout inside of a layout using erb. > > Something like this: > > <%= render :partial => 'support' do %> > <div id="helpDocumentView"> > <h3><%= @help_document.question %></h3> > > <%= @help_document.content %> > > <div id="helpDocumentHelpful" data-help-document-id="<%= > @help_document.id %>"> > <b>Was this information helpful?</b> > <a href="#">Yes</a> or > <a href="#">No</a> > </div> > </div> > <% end %> > > Is this possible? Or do I need to have 2 partials, one for a "header" > and one for a "footer"? > > Thanks!
If it is "nested layouts" you want, you my check out the following: http://guides.rubyonrails.org/layouts_and_rendering.html#using-nested-layouts http://m.onkey.org/nested-layouts-in-rails-3 I use the method described in the second link for nested layouts. Anyhow, not sure if this is even what you're looking for, just basing my guess of your use of the phrase "layout within a layout". -- 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.

