Note that there are some explanatory texts on larger screens.

plurals
  1. POZend Framework Controller to Module routing
    text
    copied!<p>So i have been doing my best trying to absorb as much as i can about the Zend Framework which is pretty new to me, i'm about two weeks in since my first attempts and being doing well so far.</p> <p>However i have run into a small issue i just can't figure out.</p> <p>So here's the deal, i have a standard Zend Framework project with a number of modules in it. Like this :</p> <pre><code>- Project - - Application - - - configs - - - controllers - - - - IndexController - - - - WMSController - - - forms - - - layouts - - - models - - - modules - - - - content - - - - - controllers - - - - - - IndexController - - - - - models - - - - - views - - - - - Bootstrap - - - views - - - bootstrap - - public etc.. </code></pre> <p>Now i have a simple test link set in the view for the WMSController wich is supposed to direct someone klicking it to the IndexController of the content module.</p> <pre><code>&lt;a href="wms/content"&gt; test link to content module&lt;/a&gt; </code></pre> <p>Now as you can probably see this link is NOT going to work since it is pointing towards localhost/wms/content which would be the content action in the WMSController which doesn't exist at this moment.</p> <p>Now what i want to do is to make the wms/content actually point towards the IndexController of the content module. Why? Well i simply do not want a user to type localhost/content to get to the content module which is part of the WMS. I want to force them to get trough the WMS controller first.</p> <p>I have read numerous things about routing being the solution using the bootstrap or the autoloader but pretty much all of them simply help you with pointing a certain url to a specific action in a specific controller.</p> <p>What i want is a url to point to a specific action in a specific controller in a specific module.</p> <p>NOTE: All the other controllers and views are still the default generated versions with no changes made to them yet!</p> <p>If anyone could show me a code example of how this is done it would be much appreciated!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload