How do you create a sub-layout or a partial that wraps a lot of custom html?

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="<%= %>">
      <b>Was this information helpful?</b>
      <a href="#">Yes</a> or
      <a href="#">No</a>
<% end %>

Is this possible? Or do I need to have 2 partials, one for a "header"
and one for a "footer"?


If it is “nested layouts” you want, you my check out the following:

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”.

Anyone running into issues with this?

- I'm using rvm and have updated rvm to the latest version (1.6.13)
- I created a clean gemset (using Ruby 1.9.2-head - p208)
- I then tried "gem install rails --pre"
I got:
ERROR: Could not find a valid gem 'rails' (>= 0) in any repository
ERROR: Possible alternatives: rails

- I could run "gem install rails" successfully so I have access to the internet and it isn't an issue with a port being blocked
- I then ran a rvm gemset empty <gemset-name> and confirmed with a gem list that there were now no local gems.
- I then retried "gen install rails --pre" and got the same error.

Any thoughts much appreciated!

Best Wishes,