Wrapper class for jQuery Dynatree extension also handles with setting selected items and attaches selected items to the form in hidden fields.
Yii 1.1 or abobe
You can call widget in view files like following.
$this->widget('ext.dynatree.DynaTree',array( 'attribute'=>CHtml::activeName($model,'categories'), 'data'=>Category::model()->getCategoryTree('tree'), 'selection'=>$model->categoryIds, ));
Total 5 comments
I uploaded demo application. It includes all related models and controller codes. Sample data is located under protected/data folder(testdrive.sql).
Hi zvik2004, Thank you for your advice. I will submit a demo application and sample data to download.
Hi,
Thanks for this extension, really great!
It would be helpful to have an example of the 'data' and 'selection' format.
Thanks
This extension saves a lot of time..
You know what I havent time to make an extension for this, for my project I used vanilla JS with hidden field to post data from forms (can you imagine the whole work :p) but now I will test that and you will have my feedback.
Leave a comment
Please login to leave your comment.