Forum: Ruby on Rails Overriding Layout

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
ceicke (Guest)
on 2007-02-06 13:07
(Received via mailing list)

I have created a page that displays a popup window when the user
clicks on a link. In this popup window, the user can get a description
of a certain element on the website (a little bit like a help system
with popup windows). Unfortunately the popup window takes the layout
of the controller and puts its content into. However this layout
contains a big menu bar that shouldn't be displayed in the popup
window. Is there a way - without creating a new controller - to
override the layout for that controller for one action?

Stephen B. (Guest)
on 2007-02-06 13:39
(Received via mailing list)
You can specify actions to be ignored in the layout method:

layout 'site', :except => ['my_popup_action']

and also:

layout 'basic', :only => ['my_popup_action']

This topic is locked and can not be replied to.