Forum: Ruby on Rails Overriding Layout

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A11b23a986b042fc05fff4d4060eeaf3?d=identicon&s=25 ceicke (Guest)
on 2007-02-06 12:07
(Received via mailing list)
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
6d57db44c5a4e0721cc7f78cf0ce308a?d=identicon&s=25 Stephen Bartholomew (steveb)
on 2007-02-06 12: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']

Steve
This topic is locked and can not be replied to.