Hi!
Have all your .ctp layouts in app/views/layouts, and add this in your
AppController:
$layout = 'my_site_wide_layout'; //notice no ".ctp" in the value.
Works for me.
remember that each layout must have a $content_for_layout variable so
cake will be able to parse views into this layout. For example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
....... all the shit which goes here
<title><?php echo $title_for_layout?></title>
</head>
<body>
<?php echo $content_for_layout?>
</body>
</html>
This way you don't have to worry for any html heading in your views.
Also, remember that you can override this adding $layout = 'something'
to any controller you want to have with different layout (for example i
have a different layout for login page)
Good luck!
dnoop pisze:
> Hi ,
>
> I have some static pages in my pages view ... i just
> changed my html to .ctp with changes in javascript (echo $javascript-
>
>> link();) and css and saved them with .ctp ext .... but when i tried
>>
> to view those .. it is embedded in the default layout ie with the
> cakephp icon at top and bottom.. .How can i change the default layout
> of pages_controller ...
>
> with regards
> Anoop
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---