Hi,


I must say I read the whole manual regarding controllers and most stuff
seems pretty straight forward but for some reason I couldn't do the
following.

>From what I see for my needs will be good to have one module for client
view and one admin  module for admin stuff.

1)
I tried using this
http://framework.zend.com/manual/en/zend.controller.modular.html
point 7.11.2

My structure is as follows - having default + admin module.

application
      default/controllers/IndexController.php

      admin/controllers/IndexController.php


$dir = array(
      'default' => PROJECT_ROOT . '/application/default/controllers',
      'admin'    => PROJECT_ROOT . '/application/admin/controllers'
);


$controller = Zend_Controller_Front::getInstance();
$controller->setControllerDirectory($dir);
$controller->setParam('noViewRenderer', true);
$controller->throwExceptions(true);


When I try to launch
domain.com/        default module cicks in as is supposed to

but when I do
domain.com/admin/index/index/

for example....it says
File "IndexController.php" was not foundexception 'Zend_Exception'

and after some debugging I see it is looking for class
Admin_IndexController.php

witch probably translates to admin/IndexController.php and not
admin/controllers/IndexController.php

Can someone lead me to what I do wrong?


2. One more question:
This models directory....I kind of miss how it comes together with the
whole part. I mean...is there any way to include
stuff automatically from there.... can I share automatically same models
dir for two modules?
Because right now to include something from there I am pretty much
include manually stuff - which doesnt make much sense if it is suggested
dir stays there.

Thanks for time spent

Regards


Reply via email to