After doing some searching I found nested-layouts (http://github.com/
radar/nested-layouts/tree/master). It seems to do the trick, although
to get it to work with my Rails 2.3.2 app, I had to change part of
line 13 of lib/nested_layouts.rb from ''app/views/layouts'' to
"#
{RAILS_ROOT}/app/views/layouts"
If anyone has some better/alternative solutions, I am all ears.
trv
On Apr 21, 2:21 pm, Trevor Menagh
<tmen...-5Jue0Nrv42UqDJ6do+/SaQ@public.gmane.org>
wrote:> Hi all,
>
> I have many layouts that apply to parts of my Rails site. Some of the
> elements of each of the layouts are the same. I would like to create
> something like a partial to use within layouts.
>
> For example, I might have two layouts that have identical <head>
> information, but different <body> formatting.
>
> Is there a way to separate out the identical information so I can DRY
> up my layout code? I didn''t have much luck creating partials in
the
> layout directory.
>
> Thanks,
> trv