I use Yii's nested set behavior , which helps me keep my categories nested, as shown here (without row names, they are in Russian): 
And all I want to do is have a Bootstrap submenu, which should be as follows:
$criteria = new CDbCriteria; $criteria->order = 'root, lft'; $categories = Category::model()->findAll($criteria); foreach($categories as $i => $category) { $items[$i]['label'] = $category->title; $items[$i]['url'] = $category->url; $items[$i]['active'] = false; $items[$i]['items'] = array( array('label'=>'123', 'url'=>'#'), array('label'=>'123', 'url'=>'#'), array('label'=>'123', 'url'=>'#', 'items'=>array( array('label'=>'1234', 'url'=>'#'), array('label'=>'1234', 'url'=>'#'), array('label'=>'1234', 'url'=>'#', 'items'=>array( array('label'=>'1234', 'url'=>'#'), array('label'=>'1234', 'url'=>'#'), array('label'=>'1234', 'url'=>'#'), )), )), ); } $this->widget('bootstrap.widgets.TbMenu', array( 'type'=>'pills', 'stacked'=>false,
I don’t understand how to do this, btw I am reading this section and just don’t know how to really apply this function to my problem. Appreciate any help.
source share