Save the code you have posted as default.ctp in...
app/views/layouts/default.ctp
Replace the word HERE with the line...
<?php echo $content_for_layout; ?>
Now when you go to…
your_app.com/pages/contact
…in your browser, Cake will put the content of contact.ctp into the default.ctp
layout in place of <?php echo $content_for_layout; ?>
PW
On 7 Jun 2012, at 11:24, gorgoro wicks wrote:
> I have no data to retrieve what i want to do is
> i have my default page with css and menu home about us contact product
> what i want is when i click on about us that the default page "Layout" stays
> the same and inside with the same css and menu to add content.
> example
>
>
> i have this as default page
>
> <?php echo $this->element('header'); ?>
> <body>
> <div id="container_wrapper">
> <div id="container_header">
> <div id="site_title"><h1><a href="#"></a></h1></div>
> <div id="container_menu">
>
> <?php echo $this->element('_menu'); ?>
> </div> <!--_menu -->
>
> </div> <!-- end of header -->
> <div id="container_middle">
>
>
> </div> <!--- end of middle --->
> <div id="container_main">
>
> HERE
> <div class="cleaner"></div>
> </div> <!-- end of main -->
>
>
> <?php echo $this->element('footer'); ?>
> </div> <!-- end of wrapper -->
> </html>
>
>
> i have create on pages folder
>
> about us.ctp contact.ctp pages and i have some content inside
>
> so then i want this view when i click about us on the menu to stay as it is
> BUT in container_main to have different content.The content of about us page
> and if i click contact the form to contact .
>
> what you write it sends to the page without the default page
>
>
>
> 2012/6/7 stork <[email protected]>
> 1. read this page
> http://book.cakephp.org/2.0/en/models/retrieving-your-data.html
> 2. be more specific
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/cake-php
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php