Thanks wiredesignz for sharing this code. I have done something similar with a lesser compact/elegant syntax to invoke them. In these approaches, I am not too happy w/ the following:
1) typically in a MVC world, the controller executes the biz logic and invokes the template to render. In thus case the controller renders the template, then the template invokes the widgets which in turn calls the associated its biz logic. The interaction is somehow doesn’t feel natural to me
2) passing parameters into the widgets is not very practical. The controllers needs to pass the params into the template and pass back to the widget.
BTW, this may be obvious, but I didn’t understand as what would trigger the call to the render() method of the widget in your case?
Regards