One simple approach that i user is to set up a dir like:
/app/views/public/modules/

I have  view helper RenderModule:
<code>
        /**
         * renders a module:
         * moduleDir_moduleName
         * 
         * @param string, module
         */
        public function RenderModule($module){
            $view = Zend_Registry::get('view');
            $config = Zend_Registry::get('config');
            $path = $config->view->publicModules;
            $currModule = str_replace('_','/',$module); 
            return $view->render('./' . $path . '/' . $currModule . '.tpl.php');
        }
</code>

so for the show new news module:
dir: /app/views/public/modules/news/newNews.tpl.php

to render it (in the view):
echo $this->RenderModule('news_newNews');

-- 
View this message in context: 
http://www.nabble.com/Implementing-complex-Views-with-ZF-tf3608385s16154.html#a10126792
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to