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!
Yii 1.1.7 and above (not tested with 1.1.6 and below,so I'm not sure whether it'll work there)
Download the latest MTreeView_2.1.zip and extract to extensions folder.
Click here to view all releases or MTreeView
Refer here to view all the available options for MTreeView.
Upgrade Instructions ¶
If you are already using the initial release of MTreeView, all you have to do is replace the MTreeView.php. There should be no problem encountered after the update, but just to be sure, just rename the old MTreeView.php. Please report any errors which will be encountered at our discussion page.
For more detailed explanation about this extension, visit my blog or download the latest sample zip file to play with the extension. The new sample zip file can be used with the sample database for version 1.1 (mtreeview_1.1.sql).
$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'=>array('/menuAdjacency/view',array('id'=>'id')) ), ));
Download the latest sample ZIP file for examples of usage and further details.