CakePHP tip: setting the layout from a view
This works in CakePHP 1.1.19.6305 (not tested in 1.2, but I can’t see why not). I needed to set the layout used for a static view (under /pages), so there was no controller, which is where all of the documentation says to set the layout. It turns out that the View class has a layout member which works in exactly the same way, so adding $this->layout = 'empty' works as you would expect (assuming you’re expecting the ‘empty.ctp’ layout, which I was). This would work for a view under a controller, although the recommended way would be via the controller in that case.