Im a new Yii Framework user and i have some problems to generate a tree from a database table. For example:
I have a table with a disk, a folder and a file id with their associated names:
d_id d_name fd_id fd_name fl_id fl_name
1 disk1 1 folder1 1 file1
1 disk1 1 folder1 2 file2
1 disk1 3 folder3 3 file3
1 disk1 4 folder4 4 null
2 disk2 5 folder5 5 file5
2 disk2 6 folder6 6 null
And i want to generate a tree like this:
-1 disk1
- 1 folder1
1 file1 // link to file 1
2 file2 // link to file 2
- 3 folder3
3 file3
4 folder4
Is it possible with the CTreeView?
I tried to do something similaire to the tree view eplained in the cookbook70 but its not similaire to the results that i’m expecting to, because it shows only a basic tree with one level, which is not the same as mine, also its doesn’t use the same data structure as mine