Reputation: 513
am new in Zend framework.
I have one .phtml file, includes menus section. i need to add that .phtml file in to the views i.e views/scripts/index.phtml page.
how can refer that
please advice
thanks in advance
Upvotes: 3
Views: 2261
Reputation: 99921
You can use the render
helper:
<?=$this->render('menu.phtml')?>
If you want to pass specific variables to the rendered script, use the partial
helper:
<?=$this->partial('menu.phtml', array("varname" => "value"))?>
The menu.phtml file must be in the search path, which usually is the path to the current module's scripts directory ( view/scripts ). You can either place the menu.phtml file in this directory, or add a directory to the search path using the addScriptPath() method on the view object.
Upvotes: 2