Each component's views can access various framework features, such as the messaging system and the Media class.
To call a view from our component's controller:
$this->_view->renderizar('vista');
$this->_view->renderizar('vista',true);
La bandera true agrega el header y footer por defecto de la aplicación:
Rendering a view:
ROOT .DS . views .DS . layout .DS . default .DS . header.php
ROOT .DS . components .DS . component .DS . views .DS . view . DS . vista.phtml
ROOT .DS . views .DS . layout .DS . default .DS . footer.php
To send information to views, assign variables in the controller as follows:
$this->_view->_variable = 'foo';
To receive information in views, read the variables as follows:
echo $this->_variable;