# Disable rendering of layout using a GET parameter?

**URL:** <https://www.ruby-forum.com/t/disable-rendering-of-layout-using-a-get-parameter/65378>\
**Category:** Rails\
**Created:** [August 17, 2006, 9:28pm UTC](https://www.ruby-forum.com/t/disable-rendering-of-layout-using-a-get-parameter/65378 "2006-08-17T21:28:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [August 17, 2006, 9:28pm UTC](https://www.ruby-forum.com/t/disable-rendering-of-layout-using-a-get-parameter/65378/1 "2006-08-17T21:28:38Z")

</div>

Hi all

Is there some sort of a built-in possiblity to disable the rendering of  
the layout using a GET parameter?

Something like

:url\_for :controller =\> :news, :action =\> :show, :id =\> news\_item,  
:layout =\> false

This should construct something like that:

/news/show/123&layout=false

And automatically the layout wouldn’t be rendered. Is this already  
built-in, or should I code it on my own?

Thanks for info.  
Joshua

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [August 17, 2006, 9:39pm UTC](https://www.ruby-forum.com/t/disable-rendering-of-layout-using-a-get-parameter/65378/2 "2006-08-17T21:39:15Z")

</div>

if you don’t want to have the layout applied for a particular action,  
just do

layout ‘my\_layout’, :except =\> :show

in your NewsController

and no layout will be applied for the show action.
