In the view file,insert below line where you want to include .phtml file in another view file.
<?php echo $this->partial('index/leftmenu.phtml', 'module'); ?>
As per our example -
You have to create the leftmenu.phtml in views/index folder, where index is the controller name. You can specify the module as the second parameter.If you are working on "application" default module then no need to pass second parameter.
you can simply write like this
<?php echo $this->partial('index/leftmenu.phtml');?>
<?php echo $this->partial('index/leftmenu.phtml', 'module'); ?>
As per our example -
You have to create the leftmenu.phtml in views/index folder, where index is the controller name. You can specify the module as the second parameter.If you are working on "application" default module then no need to pass second parameter.
you can simply write like this
<?php echo $this->partial('index/leftmenu.phtml');?>
No comments:
Post a Comment