# How to limit standard layout on action

**URL:** <https://www.ruby-forum.com/t/how-to-limit-standard-layout-on-action/55065>\
**Category:** Rails\
**Created:** [March 16, 2006, 7:38pm UTC](https://www.ruby-forum.com/t/how-to-limit-standard-layout-on-action/55065 "2006-03-16T19:38:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zaq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/f04885/32.png) [@zaq](https://www.ruby-forum.com/u/zaq)\
**Post date:** [March 16, 2006, 7:38pm UTC](https://www.ruby-forum.com/t/how-to-limit-standard-layout-on-action/55065/1 "2006-03-16T19:38:03Z")

</div>

I have an action/view that I need to return only data (other external  
processes query this action/view) but I need the standard\_layout  
template to be attached to the other actions/views in the same  
controller. ie, the editing of the data in the model needs to include  
all the navigation, except one view which should just return a  
text/plain output.

how do I say “include standard\_layout on all but this one action/view”  
?

thanks  
-zaq

---

<div class="post-metadata">

**Author:** ![zaq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/f04885/32.png) [@zaq](https://www.ruby-forum.com/u/zaq)\
**Post date:** [March 16, 2006, 7:57pm UTC](https://www.ruby-forum.com/t/how-to-limit-standard-layout-on-action/55065/2 "2006-03-16T19:57:07Z")

</div>

well…

include standard\_layout on all but this one action/view"

layout “standard”, :except =\>“one\_action”

now thats almost a 1-to-1 translation…amazing…

more at [http://api.rubyonrails.org/classes/ActionController/Layout/](http://api.rubyonrails.org/classes/ActionController/Layout/)  
ClassMethods.html

On Thursday, March 16, 2006, at 7:38 PM, zac elston wrote:

> thanks  
> -zaq
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

Mikkel B.

www.strongside.dk - Football Portal(DK)  
[nflfeed.helenius.org](http://nflfeed.helenius.org) - Football News(DK)  
ting.minline.dk - Buy Old Stuff!(DK)

---

<div class="post-metadata">

**Author:** ![zaq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/f04885/32.png) [@zaq](https://www.ruby-forum.com/u/zaq)\
**Post date:** [March 16, 2006, 8:14pm UTC](https://www.ruby-forum.com/t/how-to-limit-standard-layout-on-action/55065/3 "2006-03-16T20:14:53Z")

</div>

Mikkel B. wrote:

> well…
> 
> include standard\_layout on all but this one action/view"
> 
> layout “standard”, :except =\>“one\_action”
> 
> now thats almost a 1-to-1 translation…amazing…

I love beautiful languages. thanks

-zaq
