MTreeView extends CTreeView, which displays a tree view of hierarchical data. It can handle both nested set and adjacency hierarchy model,and can create a linked node and adds icon if you wish. It can also be used to render AJAX tree!
Click here download the extension, and extract it to your extensions folder.
Here is an example on how to use it:
Download the sample MTreeView application so you can play with the extension. Comments and suggestions are very much welcome.
You can view my blog for a more detailed explanation.
Edit:
I have updated the extension to version 1.1, wherein nodes can have their individual 'htmlOptions'. Visit my blog or the extensions page to download the latest zip files and to know the details of the updates.
Click here download the extension, and extract it to your extensions folder.
Here is an example on how to use it:
$this->widget('application.extensions.MTreeView.MTreeView',array( 'collapsed'=>true, 'animated'=>'fast', //---MTreeView options from here 'table'=>'menu_adjacency',//what table the menu would come from 'hierModel'=>'adjacency',//hierarchy model of the table 'conditions'=>array('visible=:visible',array(':visible'=>1)),//other conditions if any 'fields'=>array(//declaration of fields 'text'=>'title',//no `text` column, use `title` instead 'alt'=>false,//skip using `alt` column 'id_parent'=>'parent_id',//no `id_parent` column,use `parent_id` instead 'task'=>false,// 'icon'=>false, 'url'=>false ), ));
Download the sample MTreeView application so you can play with the extension. Comments and suggestions are very much welcome.
You can view my blog for a more detailed explanation.
Edit:
I have updated the extension to version 1.1, wherein nodes can have their individual 'htmlOptions'. Visit my blog or the extensions page to download the latest zip files and to know the details of the updates.