Load widget from inside widget

Hi,

I have a widget called WMenuBox which outputs a box with menu items.

But I have too many variables that are required to initialize this widget.

That’s why I want to make another widget called BrandsListWidget that will use WMenuBox

to create automatically brands list menu of a specific category.

To do that I need to initialize WMenuBox from WMenuBox,

How do I do this? How do I call a widget from another widget?

Thanks :)

You can call WMenuBox widget from view of BrandListWidget in same way you will call WMenuBox from controller view page.

In view file BrandListWidget -




$this->widget('application.extensions.WMenuBox', array(


));



Thanks! that was very helpful.