Issue Type: Improvement Created: 2013-02-18T07:25:01.000+0000 Last Updated: 2013-02-18T10:17:51.000+0000 Status: Closed Fix version(s): Reporter: Khalid Mushtaq (khalidmushtaq65) Assignee: None Tags: Related issues: Attachments:
I was working on zf1 and now I have decided to learn zf2. I am really facing difficulty to load layouts based on module.
Here is the scenario:
Two modules currently: Application and Admin
As Application module is activated by default, I have activated Admin module. Now every time I open url(s) example.com or example.com/admin, it loads Admin layout as it is at last index in config/application.config.php modules array.
I printed my configurations in onBootstrap method of Application/Module.php and I noticed other configurations are fine except view_manager. As I mentioned earlier Admin is last module it overrides view_manager settings ( view_manager index only loads Admin module settings ) that makes it to load admin layout. If I place Application module at last index in modules array of config/application.config.php, it will load view_manager settings from application module and so the layout.
Please guide me what to do now. I have googled and found people loading layouts by defining their configurations but that's what I am not looking for.
I think view_manager data must be wrapped in an index named as of module, if we do that and print configurations, view_manager now contains two indexes application and admin and their configurations against each index. Then zend library must load configurations based on module being browsed by user or routed.
I am anxiously waiting for your response.
Posted by Frank Brückner (frosch) on 2013-02-18T10:17:34.000+0000
This is a bug tracker. Please use the mailing lists for questions.
Have you found an issue?
See the Overview section for more details.