Bonjour à tous,
J'ai suivit le tuto suivant pour comprendre et appliquer les layouts :
http://julien-pauli.developpez.com/t...r/zend-layout/
Je construit le squelette de mon application et je fonctionne par module. J'ai donc un menu qui apparait sur toutes les pages d'un module. Je veux donc inclure cette partie automatiquement par un layout. Ce menu comporte des variables, je voulais donc utiliser l'helper de vue ActionHelper.
Dans l'exemple il montre une utilisation d'action :
Cependant, comme je fonctionne par module, voici le message d'erreur:
Code : Sélectionner tout - Visualiser dans une fenêtre à part <?php echo $this->action('gauche','login') ?> // action('index','header') dans mon cas
--------------------------------------------------
Fatal error: Uncaught exception 'Zend_Controller_Exception' with message 'No default module defined for this application' in /var/www/projet/site1/library/Zend/Controller/Dispatcher/Standard.php:392 Stack trace: #0 /var/www/projet/site1/library/Zend/Controller/Dispatcher/Standard.php(211): Zend_Controller_Dispatcher_Standard->getControllerClass(Object(Zend_Controller_Request_Http)) #1 /var/www/projet/site1/library/Zend/Controller/Dispatcher/Standard.php(245): Zend_Controller_Dispatcher_Standard->isDispatchable(Object(Zend_Controller_Request_Http)) #2 /var/www/projet/site1/library/Zend/View/Helper/Action.php(136): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #3 [internal function]: Zend_View_Helper_Action->action('index', 'header') #4 /var/www/projet/site1/library/Zend/View/Abstract.php(300): call_user_func_array(Array, Array) #5 [internal function]: Zend_View_Abstrac in /var/www/projet/site1/library/Zend/Controller/Dispatcher/Standard.php on line 392
--------------------------------------------------
La question est donc: Savez vous comment faire fonctionner les "action" avec une appli par module?
Merci d'avance.
Partager