implementing admin section in my application using zend framework
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 ex开发者_JAVA技巧ample 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
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.
精彩评论