Nested Layouts

You can use partials to reuse chunks of html across different layouts. For example, in your layouts directory could be setup like this:

/layouts/_meta.rhtml /layouts/_nav.rhtml /layouts/_footer.rhtml /layouts/layout1.rhtml /layouts/layout2.rhtml /layouts/layout3.rhtml

In each of the three layout files, you'd include each of the partials in their appropriate location in the page. e.g. to include the meta info, you'd use <% render :partial => '/layouts/meta' %>

To specify which layout you're using in a given controller, just use

layout 'layout2'

at the top of your controller.

Hope this helps.