Revision #10 has been created by Alex D. on Oct 15, 2011, 8:47:10 PM with the memo:
correction: $parent = $model->parent; was changed to $parent = $model->getparent;
« previous (#9) next (#11) »
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
[...]
Now, in our yii console or in the Application we can use
```php
$model = Hierarchy::model()->findByPk(7);
$parent = $model->getparent;
echo $parent->title;
// returns 'First Entry'
```
to get the parent element, or[...]