Comparing
#8 with
#9
Revision #9 was created by
Maurizio Domba Cerin on May 24, 2011, 1:39:36 PM.
proper path for CDropDownMenu
Content
[...]
```php
public function relations()
{
return array(
'getparent' => array(self::BELONGS_TO, 'Hierarchy', 'parent'),
'childs' => array(self::HAS_MANY, 'Hierarchy', 'parent', 'order' => 'sort ASC'),
);
}
```[...]
$items[] = $model->getListed(); // note that the [] is important, otherwise CMenu will crash.
$this->widget('zii.widgetapplication.extensions.CDropDownMenu',array(
'items'=>$items,
));
```
to render the menu with the content of our database.[...]