Difference between #8 and #9 of
Creating a database-driven hierarchical Structure combined with CMenu and superfish

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.
[...]
15 0
24 followers
Viewed: 62 993 times
Version: 1.1
Category: Tutorials
Tags: menu
Written by: thyseus
Last updated by: thyseus
Created on: Jan 16, 2010
Last updated: 12 years ago
Update Article

Revisions

View all history