2 /* SVN FILE: $Id: pages_controller.php 6296 2008-01-01 22:18:17Z phpnut $ */
4 * Static content controller.
6 * This file will render views from views/pages/
10 * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
11 * Copyright 2005-2008, Cake Software Foundation, Inc.
12 * 1785 E. Sahara Avenue, Suite 490-204
13 * Las Vegas, Nevada 89104
15 * Licensed under The MIT License
16 * Redistributions of files must retain the above copyright notice.
19 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
20 * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
22 * @subpackage cake.cake.libs.controller
23 * @since CakePHP(tm) v 0.2.9
24 * @version $Revision: 6296 $
25 * @modifiedby $LastChangedBy: phpnut $
26 * @lastmodified $Date: 2008-01-01 20:18:17 -0200 (mar, 01 ene 2008) $
27 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
30 * Static content controller
32 * Override this controller by placing a copy in controllers directory of an application
35 * @subpackage cake.cake.libs.controller
37 class PagesController
extends AppController
{
51 var $helpers = array('Html');
53 * This controller does not use a model
62 * @param mixed What page to display
66 if (!func_num_args()) {
69 $path = func_get_args();
74 $count = count($path);
79 if (!empty($path[0])) {
82 if (!empty($path[1])) {
85 if (!empty($path[$count - 1])) {
86 $title = Inflector
::humanize($path[$count - 1]);
88 $this->set('page', $page);
89 $this->set('subpage', $subpage);
90 $this->set('title', $title);
91 $this->render(join('/', $path));