Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/10/2010, 21:26
jcq_quiroz
 
Fecha de Ingreso: septiembre-2010
Mensajes: 111
Antigüedad: 13 años, 7 meses
Puntos: 0
Respuesta: Modularizacion del Proyecto

una consulta se tiene que sobre escribir Zend_Application_Module_Autoloader, en el bootstrap de cada modulo, el bootstrap de modulo user es el siguiente:
<?php

class User_Bootstrap extends Zend_Application_Module_Bootstrap
{

protected function _initAutoLoad() {
$modelLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'user',
'basePath' => APPLICATION_PATH . '/modules/user'));

return $modelLoader;
}
function _initViewHelpers() {
$this->_helper->layout->setLayout('layoutp');


$view->setHelperPath(APPLICATION_PATH . '/helpers', '');

$view->doctype('XHTML1_STRICT');
$view->headMeta()->appendHttpEquiv('Content-type', 'text/html;charset=utf-8')
->appendName('description', 'Using view helpers in Zend_view');

$view->headTitle()->setSeparator(' - ')
->headTitle('Principal');
$this->view->title = "Sistema";

}
}

pero la asignacion de otro layout, $this->_helper->layout->setLayout('layoutp'); me esta dando el siguiente error, el layouts esta en /application/layouts/scripts/layoutp.phtml

Fatal error: Uncaught exception 'Zend_Application_Bootstrap_Exception' with message 'Unable to resolve plugin "layouts"; no corresponding plugin with that name' in C:\xampp\php\PEAR\Zend\Application\Bootstrap\Boots trapAbstract.php:330 Stack trace: #0 C:\xampp\php\PEAR\Zend\Application\Bootstrap\Boots trapAbstract.php(379): Zend_Application_Bootstrap_BootstrapAbstract->getPluginResource('layouts') #1 C:\xampp\php\PEAR\Zend\Application\Bootstrap\Boots trapAbstract.php(391): Zend_Application_Bootstrap_BootstrapAbstract->getPluginResources() #2 C:\xampp\php\PEAR\Zend\Application\Bootstrap\Boots trapAbstract.php(618): Zend_Application_Bootstrap_BootstrapAbstract->getPluginResourceNames() #3 C:\xampp\php\PEAR\Zend\Application\Bootstrap\Boots trapAbstract.php(579): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL) #4 C:\xampp\php\PEAR\Zend\Application.php(347): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL) #5 C:\xampp\htdocs\modularizacion\public\index.php(28 ): Zend_Application->bootstrap() #6 {main} t in C:\xampp\php\PEAR\Zend\Application\Bootstrap\Boots trapAbstract.php on line 330

como puedo asignar otro layout para ese modulo? por favor ayudenme les estare agradecido gracias.