I am getting a weird issue when i change the default layout being
displayed.
Normally the following code works as expected ($scrips_for_layout is
populated):
(app/views/layout/default.ctp)
<?php
echo $html->meta('icon');
$html->css('cake.generic', null, array(), false);
echo $scripts_for_layout;
?>
Except when the layout is changed ($scripts_for_layout is empty):
(app/app_controller.php)
<?php
function beforeFilter() {
if($this->params[Configure::read('Routing.admin')] && !$this-
>RequestHandler->isAjax()) {
$this->layout = 'admin';
}
parent::beforeFilter();
}
?>
(app/views/layout/admin.ctp)
<?php
echo $html->meta('icon');
$html->css('cake.generic', null, array(), false);
echo $scripts_for_layout;
?>
Can anyone think of a reason why this is?
Thanks,
matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment