The standard way to do this is as follows:
admin
--controllers
----News
------IndexController.php

And then the URL would be:
http://www.example.com/admin/news_index/index

If you then wanted that to look like:
http://www.example.com/admin/news/index/index

You would have to create a custom route specifically for that controller:
new Zend_Controller_Router_Route('admin/news/index/:action/*', array('module' => 'admin', 'controller' => 'news_index', 'action' => 'index'));

Not ideal (if you have a lot of these multiple levels, and you also want the URLs to look as above), but as far as I know that's the only way.

agatone wrote:
Hello,

I have a question about controller folder depth. Lets say i have module
admin and the folder structure would be something like this:
admin
-controllers
--IndexController.php (class Admin_IndexController extends
Zend_Controller_Action)
-models
-views

By that structure i would have URL like
http://www.exmpl.com/admin/index/index
Admin being module name, index being controller and index (2) being action.

But i wish to keep my files a bit more organized, in more folders, structure
like :
admin
-controllers
--news
---IndexController.php (??? class Admin_News_IndexController extends
Zend_Controller_Action ???)
-views
-models

So this structure's url would be http://www.exmpl.com/admin/news/index/index
All fine if it would work, but looks like it doesn't allow subfolders of a
module. It takes admin as module, news as controller file (not what i
wanted) , and index as action. I'd like to keep Admin as module but NEWS to
be just a part of invoking path - i hoped that would be achived by defintion
"class Admin_News_IndexController extends Zend_Controller_Action"
Am I missing something?
Have to write my own router?

Anyone with solution or anyone who can confirm this is not possible - that i
got lost, please reply

Ty

--
Jack

Reply via email to