3
* Static content controller.
5
* This file will render views from views/pages/
9
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
10
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
12
* Licensed under The MIT License
13
* Redistributions of files must retain the above copyright notice.
15
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
16
* @link http://cakephp.org CakePHP(tm) Project
18
* @subpackage cake.cake.libs.controller
19
* @since CakePHP(tm) v 0.2.9
20
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
24
* Static content controller
26
* Override this controller by placing a copy in controllers directory of an application
29
* @subpackage cake.cake.libs.controller
31
class PagesController extends AppController {
47
var $helpers = array('Html');
50
* This controller does not use a model
60
* @param mixed What page to display
64
$path = func_get_args();
66
$count = count($path);
70
$page = $subpage = $title_for_layout = null;
72
if (!empty($path[0])) {
75
if (!empty($path[1])) {
78
if (!empty($path[$count - 1])) {
79
$title_for_layout = Inflector::humanize($path[$count - 1]);
81
$this->set(compact('page', 'subpage', 'title_for_layout'));
82
$this->render(implode('/', $path));