Code Examples and Industry News
- Created by Casey Martin: 2014-05-10 20:11:00
In this example, we are going to create a sample About Us page. Write some text and save it as about_us.ctp. Static pages must be saved with a ".ctp" file extension, and rather than spaces, use underscores.
To set a page title, add the following line to your file:
$this->pageTitle = 'About Us';
Router::connect('/about_us', array('controller' => 'pages', 'action' => 'display', 'about_us'));