Editing this Page
- To change the content of this page, create: APP/views/pages/home.ctp.
- To change its layout, create: APP/views/layouts/default.ctp.
- You can also add some CSS styles for your pages at: APP/webroot/css.
To create a default home we need to create a folder named "pages" under app/view/ and put file name "home.ctp" your can write anything on that page it will display there.

Creating layout
under under 'app/views/layouts/' folder create a "default.ctp" file
now it will display a blank page - to see content and to give link do following things
Please copy paste above code to defalut.ctp now you can view layout i marked some things in red mark now , Page title is "First Test"
- $title_for_layout
- $scripts_for_layout
- $content_for_layout
- $cakeDebug
$scripts_for_layout : will come under header part helps you to put scripts
$content_for_layout :that must come under body
$cakeDebug : will put after body
now echo $html->css('style'); : creating a css named style.css file and this file can placed under
APP/webroot/css.
Now you can view bellow layout , and i made it please try your self with differnt design

No comments:
Post a Comment