Moving Bootstrap Code to Configuration
November 5th, 2009We’re going to build on what was covered in the last video and work with Zend Controller Plugins to specify a special layout for each module in our application. We’ll also look at how we can clean up the configuration of our Bootstrap.php file by moving as much configuration as possible into the application.ini file. Included in this video is a very quick look at how the Zend Framework’s resources are defined and loaded.
Grab a copy of the project or browse the repository.

excelent tut! I’ll try to do that
[...] set up MVC” and so on stuff.. That said, this basic stuff is covered nicely on the Zend-Screencasts blog (video tutorials) [...]
absolutely great tutorial!
Great screencast!
Hello Jon,
Thank you for this video. This video is one of the most important. I would like to ask you to create video about routing languages.
To create a website with modules and language versions.
example:
http://domain.cz/en/index // english version
http://domain.cz/cz/index // czech version
And some for every modules as admin
http://domain.cz/en/admin/index // en version
http://domain.cz/cz/admin/index // cz version
I would like to create multi-language system, in which the structure of the system using the modules, as it was in this video.
Thank you very much.
Best regards
Vit Klimenko (Czech Republic)
Same request as Cavaller.
It would be really helpful!
Great tutorial! But I have one problem: the bootstraps. I usually add stylesheets and javascripts through the bootstrap and whenever is need from the controllers. But the bootstrap, in this approach, works for both modules.
Is there anyway to bootstrap from modules?
Its me again. I’ve found a problem during the tutorial implementation. Not exactly the ‘moving’ to config, but the layout picker part. When I use the router with ini parser, it gives me an error that the file ‘.phtml’ could not be found.
I’ve just switched the plugin to use the postDispatch instead the preDispatch and It worked.
Just to share…
Hi Jon,
Thanks again for your helpful tutorial. Just one question. If you want to have different layouts for your modules, why don’t you put that layouts folder in the module folder, so we will have:
(1) application_default_layouts_scripts_layout.phtml
and for the admin:
(2) application_admin_layouts_scripts_layout.phtml
without any thing in your library to find out which layout to render?
kind regards,
Johan
Awesome tutorials dude! Easy to follow and very helpful. You should start making complete video tutorial dvd’s and sell them like the guys at lynda.com
Best wishes,
Alex
great tutorials
question in module/model
I created a model user under
modules/default/models/User.php
I got the error when I try to use it,
how do know how could I set the model path?
Fatal error: Class ‘User’ not found
Hey
Great tut but what about a modulename/models
and modulename/forms ?
how to set them??
Nice Tutorial, I use NetBeans. Has anyone had a problem with downloading empty folders if you create a module via Zend Tool on a remote system?