Overriding Layout


#1

Hi!

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?

Thanks,
Christoph


#2

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’]

Steve