# Layout

**URL:** <https://www.ruby-forum.com/t/layout/147392>\
**Category:** Rails I18n\
**Created:** [September 1, 2008, 11:37am UTC](https://www.ruby-forum.com/t/layout/147392 "2008-09-01T11:37:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/a698b9/32.png) [@vanight](https://www.ruby-forum.com/u/vanight)\
**Post date:** [September 1, 2008, 11:37am UTC](https://www.ruby-forum.com/t/layout/147392/1 "2008-09-01T11:37:58Z")

</div>

Hi  
I have one main layout and I would like that the left menu change  
depending on the controller. How can I do it ?

Thanks

---

<div class="post-metadata">

**Author:** ![vanight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/a698b9/32.png) [@vanight](https://www.ruby-forum.com/u/vanight)\
**Post date:** [September 1, 2008, 7:06pm UTC](https://www.ruby-forum.com/t/layout/147392/2 "2008-09-01T19:06:27Z")

</div>

2008/9/1 David N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> Hi  
> I have one main layout and I would like that the left menu change  
> depending on the controller. How can I do it ?

Hey David, please notice that you were writing to a mailing list  
dedicated  
only to internationalization features. You should send these general  
rails  
questions to the general rails mailing list.

Anyway here’s how to do it: you can check what controller and/or action  
you’re in on your layout and then show its corresponding menu. You just  
need  
to check:

controller.controller\_name  
controller.action\_name
