0
votes

I tried the modular structure in my app but i couldnt achieve.. what i wanted.

i followed this http://www.amazium.com/blog/create-modular-application-with-zend in my example guestbook application

here i did everything as written. and in the layouts folder made two layouts. one layout.phtml and another blog.phtml. blog is my module. when i access http://localhost/example1/public/index.php/ i get the layout from blog.phtml

this is because in my application.ini i have mentioned as follows

resources.layout.layout = default

blog.resources.layout.layout = blog

1
Have you actually added a controller helper and its initialization in the bootstrap, as suggested by the author of that article? - Vika

1 Answers

0
votes

In your controllers of "blog" module, use:

function init() {
    $layout = $this->_helper->layout();
    $layout->setLayoutPath('path/to/your/blog/layouts/');
    $layout->setLayout('blog.phtml');
}

That's "Basic" but it works.