Zend Framework: Render multiple Views in one Layout

前端 未结 4 1028
终归单人心
终归单人心 2020-12-24 09:37

I want to generate a dynamic site using Zend_Layout.

My layout (/application/layouts/scripts/layout.phtml) contains the following lines:

...        
         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-24 10:13

    I got to this page when looking for an answer to my own problem, which was that my layout got called multiple times. This happened because of multiple reasons:

    1) I made a bad ajax call, had /help instead of /module/help

    2) I called an action, exampleAction(), I had to put a

    $this->_helper->layout->disableLayout();
    

    To prevent the layout from being rendered again.

    3) I did a redirect, try using a forward or route.

提交回复
热议问题