How to render widget in social engine

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'); ?> 
 

Render Widget in Social Engine

Post a comment

0 Comments