In Zend Framework, is it possible to include (call) a Partial view from within a View? Cheers,
From the Docs for Partial View Helper:
The Partial view helper is used to render a specified template within its own variable scope. The primary use is for reusable template fragments with which you do not need to worry about variable name clashes. Additionally, they allow you to specify partial view scripts from specific modules.
You would then call it from your view script using the following:
<?php echo $this->partial('partial.phtml', array( 'from' => 'Team Framework', 'subject' => 'view partials')); ?>
If you dont need the separate variable scope, you can simply call render('script.tpl')
or include
.
you can do that with the Action View Helper
<?php echo $this->action('list','comment'); ?>
Where list
is the action and comment
is the controller
More details http://framework.zend.com/manual/en/zend.view.helpers.html