# Rails - Layouts

**URL:** <https://www.ruby-forum.com/t/rails-layouts/61773>\
**Category:** Ruby\
**Created:** [May 27, 2006, 1:31am UTC](https://www.ruby-forum.com/t/rails-layouts/61773 "2006-05-27T01:31:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_DSKraus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@Paul\_DSKraus](https://www.ruby-forum.com/u/Paul_DSKraus)\
**Post date:** [May 27, 2006, 1:31am UTC](https://www.ruby-forum.com/t/rails-layouts/61773/1 "2006-05-27T01:31:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Paul\_DSKraus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@Paul\_DSKraus](https://www.ruby-forum.com/u/Paul_DSKraus)\
**Post date:** [May 27, 2006, 1:40am UTC](https://www.ruby-forum.com/t/rails-layouts/61773/2 "2006-05-27T01:40:23Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![Paul\_DSKraus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@Paul\_DSKraus](https://www.ruby-forum.com/u/Paul_DSKraus)\
**Post date:** [May 27, 2006, 2:14am UTC](https://www.ruby-forum.com/t/rails-layouts/61773/3 "2006-05-27T02:14:51Z")

</div>

> 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?

---

<div class="post-metadata">

**Author:** ![Paul\_DSKraus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@Paul\_DSKraus](https://www.ruby-forum.com/u/Paul_DSKraus)\
**Post date:** [May 27, 2006, 3:12am UTC](https://www.ruby-forum.com/t/rails-layouts/61773/4 "2006-05-27T03:12:34Z")

</div>

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
