I don't understand why I'm getting this message, this is my
controller:
<?php
class PagesController extends AppController {
var $name = 'Pages';
function display() {
$path = func_get_args();
$count = count($path);
if (!$count) {
$this->redirect('/');
}
$page = $subpage = $title_for_layout = null;
if (!empty($path[0])) {
$page = $path[0];
}
if (!empty($path[1])) {
$subpage = $path[1];
}
if (!empty($path[$count - 1])) {
$title_for_layout = Inflector::humanize($path[$count -
1]);
}
$this->set(compact('page', 'subpage', 'title_for_layout'));
$this->render(implode('/', $path));
}
function home() {
$this->layout = 'main';
}
function news() {
}
function events() {
}
}
?>
and here's my routes file:
<?php
Router::connect('/login', array('controller' => 'users', 'action'
=> 'login'));
Router::connect('/admin/logout', array('controller' => 'users',
'action' => 'logout'));
Router::connect('/', array('controller' => 'pages', 'action' =>
'home'));
--
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