I made a mistake by setting the module inside of the controller instead of the opposite. Now it works, with this structure:
[EMAIL PROTECTED] application]$ find -mindepth 1 -maxdepth 2 -type d ./default ./default/controllers ./default/views ./admin ./admin/controllers ./admin/views ./models And now it works. Thanks for your feedback, it helped out. /Peter On Sun, 2007-11-18 at 12:00 -0500, Matthew Weier O'Phinney wrote: > -- Peter Lauri <[EMAIL PROTECTED]> wrote > (on Sunday, 18 November 2007, 06:37 PM +0200): > > I went with this approach, but I got stuck directly :) Now I have: > > > > /controllers/IndexControll.php > > /controllers/admin/IndexController.php > > > > In the bootstrap I have: > > > > $o_frontController->setControllerDirectory(array( > > 'default' => './application/controllers', > > 'admin' => './application/controllers/admin' > > )); > > > > But how do I control where the views will be located? > > > > The /application/views/scripts has the following content: > > > > ./footer.phtml > > ./menu.phtml > > ./index/index.phtml > > ./header.phtml > > > > But still I get this error: > > > > Fatal error: Uncaught exception 'Zend_View_Exception' with message > > 'script 'index/index.phtml' not found in path > > create the following structure: > > controllers/ > IndexController.php > Admin/ > IndexController.php > views/ > scripts > footer.phtml > header.phtml > menu.phtml > index/ > index.phtml > > It's clear from your error message that the views directory is not at > the same level as your controllers directory; the ViewRenderer uses the > above directory structure to determine where to look for views, so if > your structure does not match it, you'll have issues. > > > > On Mon, 2007-11-12 at 09:10 +0900, Jude Aakjaer wrote: > > > Hi Peter, > > > > > > I've done a similar thing, I used the module setup > > > > > > http://framework.zend.com/manual/en/zend.controller.modular.html > > > > > > and created a module called cms, so I had > > > > > > /controllers/IndexController.php > > > /controllers/NewsController.php > > > ... > > > /cms/controllers/IndexController.php > > > /cms/controllers/NewsController.php > > > ... > > > > > > > > > Jude A. > > > > > > > > > On Mon, 12 Nov 2007 05:07:41 +0900, Peter Lauri <[EMAIL PROTECTED]> > > > wrote: > > > > > > > Hi, > > > > > > > > I am familiar with the basics how ZF is working when it comes to > > > > Controller/Action etc. For example I will have: > > > > > > > > faq > > > > faq/show/id/1 > > > > ... > > > > > > > > But, for the admin section I want: > > > > > > > > admin/faq/listall > > > > admin/faq/add > > > > admin/faq/delete/id/2 > > > > admin/faq/edit/id/5 > > > > .. > > > > > > > > How should I do that. Do I need to put an extra index.php in the > > > > subfolder admin and do as normal? Or any other commonly used approach? > > > > > > > > /Peter > > > > > > > > > > > > > > > > >
