Forum: Ruby on Rails Is inheiritance possible in layouts?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
72175b31188b79b993d97f72d1913216?d=identicon&s=25 Dave (Guest)
on 2007-04-27 03:37
(Received via mailing list)
Is it possible to have one layout extend another one?

For example:

normal.rhtml:
<html>
<stuff />
<%= @content_for_layout %>
</html>


extra_stuff.rhtml somehow extends normal.rhtml:
<morestuff />
<%= @content_for_layout %>
<evenmorestuff />



So any page that uses extra_stuff as its layout looks like this:
<html>
<stuff />
<morestuff />
<%= @content_for_layout %>
<evenmorestuff />
</html>

Is this possible to do? It would be really handy. Thanks in advance
for
the help!
2f9a03aa0fcfe945229cb6126eda2cb2?d=identicon&s=25 Philip Hallstrom (Guest)
on 2007-04-27 04:06
(Received via mailing list)
> Is it possible to have one layout extend another one?
>
> Is this possible to do? It would be really handy. Thanks in advance

http://www.google.com/search?q=nested+layouts+in+rails

4th link.
41c16e2bd2dd7efcbb7981e433471fda?d=identicon&s=25 Herryanto Siatono (jugend)
on 2007-04-27 04:58
(Received via mailing list)
Dave,

It looks very much like DRYML, part of Habo.

http://hobocentral.net/manual/chapters/3_dryml.html

For my case simple segment layout I'll just use helper method:

http://www.pluitsolutions.com/2007/02/07/rails-an-...
-yourself-dry-template/

Herry
This topic is locked and can not be replied to.