-- JARUZ <[EMAIL PROTECTED]> wrote
(on Friday, 21 September 2007, 04:27 AM -0700):
> I am using the Conventional Modular Directory Layout and am not able to
> execute additional Actions belonging to the IndexController of any module.
> Additional Actions belonging to any other controller work just fine.
>
> I.e.
> indexAction from IndexController from Default module works:
> http://localhost/
> anotherAction from IndexController from Default module does not work:
> http://localhost/another/
> indexAction from AditionalController from Default module works:
> http://localhost/aditional/
> anotherAction from AditionalController from Default module works:
> http://localhost/aditional/another/
>
> indexAction from IndexController from Rictloader module works:
> http://localhost/rictloader/
> anotherAction from IndexController from Rictloader module does not work:
> http://localhost/rictloader/another/
> indexAction from AditionalController from Rictloader module works:
> http://localhost/rictloader/aditional/
> anotherAction from AditionalController from Rictloader module works:
> http://localhost/rictloader/aditional/another/
>
> Basically my question is: how do I get other Actions from the
> IndexControllers to work?
The route behaves like this: /module/controller/action/*. You need to
have the name of the controller between the module and action:
http://localhost/rictloader/index/another
<snip>
> On a related question (if I get this setup working): which one would have
> precedence: an Action belonging to the IndexController or the indexAction
> belonging to another Controller with the same name as the Action belonging
> to the IndexController?
> To explain myself better:
> http://localhost/another/
> Could just as well be anotherAction from IndexController or indexAction from
> Anothercontroller.
No. Assuming that the default routing is being matched, the above URL
goes to AnotherController::indexAction(). Always.
The default route looks to see if the first item in the path is a
module. If so, then if there is a second item, it uses that as the
controller, and any third item as the action.
If the first item in the path is *not* a module, then it is a
controller, and any second item on the path is the action.
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/