getModuleName(); if ($module === 'default') { $layoutPath = APPLICATION_PATH . '/views/' . $theme; $viewPath = APPLICATION_PATH . '/views/' . $theme; } else { $layoutPath = APPLICATION_PATH . '/modules/' . $module . '/views/' . $theme; $viewPath = APPLICATION_PATH . '/modules/' . $module . '/views/' . $theme; } $bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap'); $view = $bootstrap->bootstrap('View')->getResource('View'); $view->setBasePath($viewPath); $layout = $bootstrap->bootstrap('Layout')->getResource('Layout'); $layout->setLayout('main'); $layout->setLayoutPath($layoutPath); } } }