Revision #9 has been created by Maurizio Domba Cerin on May 24, 2011, 1:39:36 PM with the memo:
proper path for CDropDownMenu
« previous (#8) next (#10) »
Changes
Title
unchanged
Creating a database-driven hierarchical Structure combined with CMenu and superfish
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
menu
Content
changed
[...]
```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.[...]