Just have
$this->layout = 'your_other_layout';
inside your view.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from
hi
To avoid messing the core, in your /app/app_controller.php (create one
if none):
class AppController extends Controller {
function beforeRender() {
if ($this->name == 'Pages' && $this->action == 'your_static_page')
{
$this->layout = 'other_layout';
}
}
}
If I remember well,
Hi Andrew,
Thanks for the reply. I actually am trying to avoid messing with
cake/libs/controller codes. Your way by overwriting pages controller is
working fine, but if there's no current cake's elegant workaround on it I'm
considering to mimic its functionality by creating a statics controller a
Uwie,
I'd take a copy of cake/libs/controller/pages_controller.php and paste
in into app/controllers/
Add the following into app/controllers/pages_controller.php:
var $layout = 'your_custom_layout';
Create 'your_custom_layout.thtml' in app/views/layouts/ and hopefully
Bob's your uncle :-)
HTH
Hi all.
I need to set the layout for a static page in my "views/pages" to another
layout already in my "views/layouts" so it's not going to use the
default.thtml one. I've searched the group and found none, and I believe
I've missed the part about "views/pages" in manual if there's any.
So, is i