Note that there are some explanatory texts on larger screens.

plurals
  1. POZend application.ini resourse for different modules
    text
    copied!<p>I am writing a zend application and trying to keep the functionality as modular as possible. Basically I want to drop the folder into the application and have instant functionality.</p> <p>Anywho; I'm trying to create sidebar links from each module. The method I'm using is to use the bootstrap:</p> <p>Here is the function in my bootstrap file. I've set the routes in another function.</p> <pre><code> public function _initNavigation() { $navigation = new Zend_Navigation(); $navigation-&gt;addPages( array( array( 'label' =&gt; 'Link Name', 'route' =&gt; 'routeA', 'class' =&gt; 'heading' ), array( 'label' =&gt; 'Link Name', 'route' =&gt; 'routeA', 'params'=&gt;array('param' =&gt; 'value'), ), array( 'label' =&gt; 'Link Name', 'params'=&gt;array('param' =&gt; 'value'), 'route' =&gt; 'routeA' ) ) ); $this-&gt;bootstrap('layout'); //this line giving error :( $layout = $this-&gt;getResource('layout'); $view = $layout-&gt;getView(); $view-&gt;navigation($navigation); </code></pre> <p>The error I was getting was:</p> <blockquote> <p>Resource matching "layout" not found</p> </blockquote> <p>After some head banging I found that I had to put the module name in front of the resourse in the config/application.ini file, eg:</p> <pre><code>moduleA.resources.layout.layoutPath = APPLICATION_PATH "/modules/moduleA/views/scripts" </code></pre> <p>Now here's the question: how do I get the layout resource using a single resource? i.e. without specifying the module name for each new module I use?</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