|
|||
|
I am using the modular directory structure where you simply call $front->addModuleDirectory ('../application/modules') and each module has its own directory under that (as shown in the documentation). However, I have partial views that are used by all of the modules. I didn't want to copy the partial views into every module, so I created a separate directory called partial_views at the same level as the modules directory and I call echo $this->partial ('../../../../partial_views/some_partial_view.phtml') from my view scripts. I am just wondering if anyone has come up with a more elegant way of doing this.
|
|
||||
|
Sawatdee,
Did you ever hear about Zend_Layout? I think this could the answer for you. I'm newbie at all but I guess this is a way to manage a lot of recurring code in the application's presentation. I suggest the reading: (*) post edited, I added two more links I've just found. regards,
__________________
Lucas Mauricio C. e Martins CR Vasco da Gama, my biggest passion! Ajude a Combater o Spam! - Help fighting spam! Last edited by lucasm : 04-07-2008 at 01:33 AM. |
|
|||
|
Quote:
Root
Using the above structure views placed in the second folder (views) could be loaded from any module. To make it work you have to pass 'default', pointing to the controllers folder (folder1), to $controller->setControllerDirectory. After that you can call $this->partial ('some_partial_view.phtml') without the path. Hope this helps. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|