|
|||
|
Hi all,
I've been using framework for quite a long time and now I want start using Zend_Layout to tidy up my code. I have several modules including default and ajax. What I need to do is change (or disable) layouts per module. For example, I would like to use different layout for all my ajax module (basically all ajax controllers/actions). Also I would like to assign different stylesheets and javascripts to different modules as well as set different headTitle for specific modules and do other stuff that I would otherwise do in a controller or a .phtml file. I've spent entire day today trying to understand how to do it to no avail. It's driving me crazy and that's why out of despair I am asking for your help ![]() Can anyone either explain how to do it or point me to some nice tutorials that explain exactly this? Thanks in advance! |
|
|||
|
Gosh, sometimes one has to ask a question to find an answer himself...
Two minutes after I posted the topic, I found an explanation here: Per Module Zend_Layout | Views From The Hill You can do it by calling PHP Code:
PHP Code:
|
|
|||
|
Hmm, nevertheless, I still have a question: how can I set things like headTitle() in the preDispatch function?
I am trying to do this: PHP Code:
Code:
Fatal error: Call to undefined method Zend_Layout::headTitle() in /*/library/Custom/Plugin/Dispatcher.php on line 16 Last edited by Cypher : 10-04-2008 at 06:11 PM. |
|
|||
|
This turned out to be my own monologue
![]() Luckily I found a solution myself again by reading Zend/Layout.php file. Here's how my preDispatch function looks now: PHP Code:
Last edited by Cypher : 10-05-2008 at 03:40 PM. Reason: found solution |
![]() |
| Thread Tools | |
| Display Modes | |
|
|