# Question abouyt layouts

**URL:** <https://www.ruby-forum.com/t/question-abouyt-layouts/109453>\
**Category:** Rails\
**Created:** [July 15, 2007, 3:02am UTC](https://www.ruby-forum.com/t/question-abouyt-layouts/109453 "2007-07-15T03:02:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeannibee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Post date:** [July 15, 2007, 3:02am UTC](https://www.ruby-forum.com/t/question-abouyt-layouts/109453/1 "2007-07-15T03:02:15Z")

</div>

Hi

How do I create 1 layout file for the while site and have all  
controllers use that? I’d rather avoid copy/pasting for every controller  
I have.

Thanks.

---

<div class="post-metadata">

**Author:** ![jeannibee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Post date:** [July 15, 2007, 3:47am UTC](https://www.ruby-forum.com/t/question-abouyt-layouts/109453/2 "2007-07-15T03:47:50Z")

</div>

Create an application.rhtml in app/views/layouts

---

<div class="post-metadata">

**Author:** ![jeannibee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Post date:** [July 15, 2007, 3:53am UTC](https://www.ruby-forum.com/t/question-abouyt-layouts/109453/3 "2007-07-15T03:53:03Z")

</div>

Jean N. wrote:

> Hi
> 
> How do I create 1 layout file for the while site and have all  
> controllers use that? I’d rather avoid copy/pasting for every controller  
> I have.
> 
> Thanks.

The application.rhtml file in the layout directory is the default layout  
file that is used for the website. So by modifying that file the  
complete site will use that layout without having to include a :layout  
symbol with renders etc.

If you want additional layouts add files to that directory and point to  
the additional layouts when you render etc:

render ‘whateversuperpage’ :layout =\> ‘anotherlayout’
