Hi, I was hanging out in zftalk earlier and someone asked about using a the partial view helper and loading a template from a different module.
I got curious and went looking, I wanted to do the same thing eventually. In the docs at http://framework.zend.com/manual/2.1/en/modules/zend.view.helpers.html#parti al-helper, then scroll down do the heading, Rendering Partials in Other Modules ----- snip from docs ---- Sometime a partial will exist in a different module. If you know the name of the module, you can pass it as the second argument to either partial() or partialLoop(), moving the $model argument to third position. For instance, if there's a pager partial you wish to use that's in the 'list' module, you could grab it as follows: <?php echo $this->partial('pager.phtml', 'list', $pagerData) ?> In this way, you can re-use partials created specifically for other modules. That said, it's likely a better practice to put re-usable partials in shared view script paths. ----- But this doesn't seem to work. I checked in to the partial and partial loop helper code and they only show two params, $name and $values on the invoke function, how you do get the third one in there. Doc's bug? Or am I missing something? Btw, I was able to use a template_map in my second module , ( quick and dirty code - http://pastebin.com/x1qijSbU ), to load a partial from my second module in to my default module application layout template. As an alternative way. Thanks Terre -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
