I have this structure:

application
 /modules
  /default
   /controller
   /...
  /admin
   /controllers
   /...

my bootstrap file looks like this:

$config = new Zend_Config_Ini(APPLICATION_PATH . '/config.ini');
Zend_Registry::set('config', $config);

$frontController = Zend_Controller_Front::getInstance();
$frontController->addModuleDirectory(APPLICATION_PATH . '/modules');
$frontController->setParam('env', APPLICATION_ENVIRONMENT);

Zend_Layout::startMvc($frontController->getModuleDirectory().'/layouts/scripts');

defined('MODULE_PATH')
    or define('MODULE_PATH', $frontController->getModuleDirectory() . '/');


$view = Zend_Layout::getMvcInstance()->getView();
$view->doctype('XHTML1_STRICT');
$view->setScriptPath( MODULE_PATH . 'views/scripts/' );

// CLEANUP - remove items from global scope
unset($view);
unset($frontController);

when ever i try to enter the admin/ module it displays the /default module
contents like the getmoduledirectory returns the default module always. by
looking at that function i noticed it has to have an argument of the module
to load, how can i access the current requested module? Or is there any
other way of doing this?

Thanks.

-- 
Vincent Gabriel.
Lead Developer, Senior Support.
Zend Certified Engineer.

Reply via email to