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

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

Revisions

View all history