Reputation: 1
i am new in cakephp so pls help me How to make about, and other pages in cake php
and tell me how to design this page no
thanks Rajesh
Upvotes: 0
Views: 85
Reputation: 2594
CakePHP ships with a default controller PagesController.php. This is a simple and optional controller for serving up static content. The home page you see after installation is generated using this controller. If you make the view file app/View/Pages/about_us.ctp you can access it using the url http://example.com/pages/aboutus. You are free to modify the Pages Controller to meet your needs.
For example : your PagesController.php
public function aboutus()
{
// do something
}
And your create view file in your app/view/pages/aboutus.ctp.Then open your app/Config/routes.php and add this line according to your need.
Router::connect('/about-us', array('controller' => 'page','action'=>'aboutUs'));
Upvotes: 1
Reputation: 505
You can create your custom page by creating one controller specialised for all static page.
Or you can make use of PageController.
To beautify your url to something like /about-us or /contact, open your app/Config/routes.php and add this line according to your need.
Router::connect('/about-us', array('controller' => 'page','action'=>'aboutUs'));
Upvotes: 0