Note that there are some explanatory texts on larger screens.

plurals
  1. POZend Framework diffrent config file for module
    primarykey
    data
    text
    <p>I try to build my applicatoin with module structur and I read a lot of soluttion how to do it (the best solution I think is <a href="http://offshootinc.com/blog/2011/02/11/modul-bootstrapping-in-zend-framework/comment-page-1/" rel="nofollow">http://offshootinc.com/blog/2011/02/11/modul-bootstrapping-in-zend-framework/comment-page-1/</a>) but I had a couple of problem becouse when I try to set a diffrent default controller and action to Blog module this code in Blog_Bootstrap_Initializer: </p> <pre><code>protected function _initDefaultController(){ $front = $this-&gt;getBootstrap()-&gt;getResource('frontcontroller'); $front-&gt;setDefaultAction('index'); $front-&gt;setDefaultControllerName('Auth'); print "INITIALIZING Blog"; } </code></pre> <p>the method is performed because INITIALIZING Blog is displayed on the screen but the code has no efect. The Same situation is when I try to set in application/modules/blog/configs/module.ini</p> <pre><code>resources.frontController.defaultControllerName = 'Auth' resources.frontController.defaultAction = 'login' </code></pre> <p>Or</p> <pre><code>blog.resources.frontController.defaultControllerName = 'Auth' blog.resources.frontController.defaultAction = 'login' </code></pre> <p>application.ini</p> <pre><code>[production] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" appnamespace = "FA" autoloadernamespaces[] = 'SilverCms' autoloadernamespaces[] = 'FA' autoloadernamespaces[] = 'Twitter' ; FrontController ; module enable resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.frontController.params.displayExceptions = 0 ; default controller, action and module resources.frontController.params.useDefaultControllerAlways = false resources.frontController.params.prefixDefaultModule = false resources.frontController.defaultModule = 'default' resources.modules[] = '' ;resources.frontController.defaultControllerName = 'Index' ;resources.frontController.defaultAction = 'index' ; language plugin enable resources.frontController.plugins.Language = SilverCms_Controller_Plugin_Language ; module plugin enable ;resources.frontController.plugins.ActiveModule = SilverCms_Controller_Plugin_ActiveModule resources.frontController.baseurl = /zftest/public/ ; Locale resources.locale.default = "en_US" resources.locale.force = false ; Translate resources.translate.adapter = "Tmx" resources.translate.data = APPLICATION_PATH "/modules" resources.translate.locale = "auto" resources.translate.disableNotices = true resources.translate.scan = directory ;cahce cache.enable = false ; Routes resources.router.routes.module.type = Zend_Controller_Router_Route_Module resources.router.routes.module.abstract = On resources.router.routes.language.type = Zend_Controller_Router_Route resources.router.routes.language.route = ":language" resources.router.routes.language.reqs.language = "^[a-z]{2}$" resources.router.routes.language.defaults.language = "en" resources.router.routes.default.type = Zend_Controller_Router_Route_Chain resources.router.routes.default.chain = "language,module" resources.router.routes.login.route = ':language/login/' resources.router.routes.login.defaults.controller = 'Auth' resources.router.routes.login.defaults.action = 'login' ; View resources.view.helperPath.View_Helper = APPLICATION_PATH "/modules/default/views/helpers" </code></pre> <p>Main bootstrap</p> <pre><code>class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initPlugins() { $this-&gt;bootstrap('frontController'); $front = Zend_Controller_Front::getInstance(); $front-&gt;setControllerDirectory(array( 'default' =&gt; APPLICATION_PATH .'/modules/default/controllers', 'blog' =&gt; APPLICATION_PATH .'/modules/blog/controllers', 'billing' =&gt; APPLICATION_PATH .'/modules/billing/controllers', )); $front-&gt;registerPlugin(new SilverCms_Controller_Plugin_ActiveModule()); return $front; } protected function _initHelpers(){ Zend_Controller_Action_HelperBroker::addPrefix('SilverCms_Controller_Action_Helper'); } } </code></pre> <p>main bootstrap file in module</p> <pre><code>class Blog_Bootstrap extends SilverCms_Application_Module_Bootstrap { } </code></pre> <p>config file in module (module.ini)</p> <pre><code>[production] ; uruchomienie domyslnego kontrolera gdy nie zostanie podany zaden inny blog.resources.layout.layout = "blog" blog.resources.layout.layoutPath = APPLICATION_PATH"/modules/blog/views/layouts/scripts" blog.resources.frontController.defaultControllerName = 'Test' blog.resources.frontController.defaultAction = 'test' [development : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 resources.frontController.params.displayExceptions = 1 </code></pre> <p>What I doing wrong? Best Regards</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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