Moving Bootstrap Code to Configuration

November 5th, 2009

We’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.
 

13 Responses to “Moving Bootstrap Code to Configuration”

  1. developtus says:

    excelent tut! I’ll try to do that

  2. [...] set up MVC” and so on stuff.. That said, this basic stuff is covered nicely  on the Zend-Screencasts blog (video tutorials) [...]

  3. Michau0142 says:

    absolutely great tutorial! :)

  4. Nexik says:

    Great screencast!

  5. Cavalier says:

    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)

  6. Grab says:

    Same request as Cavaller.
    It would be really helpful!

  7. Froskie says:

    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?

  8. Froskie says:

    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…

  9. Johan says:

    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

  10. Alex says:

    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

  11. Calvin says:

    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

  12. Robert says:

    Hey

    Great tut but what about a modulename/models
    and modulename/forms ?
    how to set them??

  13. Shannon says:

    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?

Leave a Reply

Desktop RSS feed iPhone + iPod