We can add widgets in to pages from Admin Layout manager but sometimes we need to call widgets through code so using the following code we can call the widget into tpl file.
<?php echo $this->content()->renderWidget('modulename.widgetname'); ?>
For example you want to call userinfo widget that is created inside user module than you can call it using:
<?php echo $this->content()->renderWidget('user.userinfo'); ?>
0 Comments