Forum: Ruby Rails - 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.
Paul D. Kraus (Guest)
on 2006-05-27 03:31
(Received via mailing list)
I am working through the agile programing ed2 beta book and I have a
question about the example.
It uses to controllers admin and store.
Then it does a page layout for store.

How can I have one page layout for all controllers?

For instance the admin side and the store side of the site would still
visually have the same template elements. Same Navigation, same overall
appearance.

Paul
Philip H. (Guest)
on 2006-05-27 03:40
(Received via mailing list)
> I am working through the agile programing ed2 beta book and I have a
> question about the example.
> It uses to controllers admin and store.
> Then it does a page layout for store.
>
> How can I have one page layout for all controllers?
>
> For instance the admin side and the store side of the site would still
> visually have the same template elements. Same Navigation, same overall
> appearance.

Create app/views/layouts/application.rhtml

-philip
Paul D. Kraus (Guest)
on 2006-05-27 04:14
(Received via mailing list)
>
>
>
> Create app/views/layouts/application.rhtml


Perfect!
Now if using the same example i have a store controller, store layout,
and
an application layout do the cascade or  if i load store will it just
pull
the store layout?
Kevin C. (Guest)
on 2006-05-27 05:12
(Received via mailing list)
Paul:
Only one layout is used. The precedence order goes something like this:

A layout specified in render -> specified in the controller -> default
controller layout -> default application layout
This topic is locked and can not be replied to.