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

Revision #8 has been created by Nitish Bezzala on Nov 1, 2010, 2:50:11 AM with the memo:

Use Gii to generate model and CRUD instead of yiic.
« previous (#7) next (#9) »

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

[...]
~~~

You may add additional Columns if you wish, and you can rename the table however you like.
The 'parent' field contains the id of the direct parent, while 'sort' defines, where our row gets displayed in the menu.

After that, we generate the model and a C-R-U-D interface
:
 
 
~~~
 
$ php protected/yiic shell
 
Yii Interactive Tool v1.1 (based on Yii v1.1.0)
 
Please type 'help' for help. Type 'exit' to quit.
 
>> model Hierarchy
 
>> crud Hierarchy
 
~~~
 
 
When this commands run without an error
 using [Gii](http://www.yiiframework.com/doc/guide/1.1/en/topics.gii).
 
 
Once the model is ready
, we should add two relation rules to our new created modelit:


```php
public function relations()
{
[...]
15 0
24 followers
Viewed: 62 987 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