like button with yii

Hi every one !

i need to know what’s the best way to create like button in yii framework ?

which one is the best ?

extension? or ajaxbutton ?

please guide!!!!!

Ajax button should do the job.

Please check this:

thanks for your reply

would you give me example i do some ajax but doesn’t work!

like the simplest one (the code below) but doesn’t work!

this is my controller:

public function actionUpdateAjax(){

           $data = array();

        $data["myValue"] = "Content updated in AJAX";

        $this->renderPartial('_test', $data, false, true);


    public function actionRoot(){

           $data = array();

        $data["myValue"] = "Content loaded";

        $this->render('root', $data);


and my view:_test.php that renderpartial

<div class="main">

<?php echo $myValue ?>


and the another one:

<div class="main">

    <div id="data">

   <?php $this->renderPartial('_test', array('myValue'=>$myValue)); ?>


<?php echo CHtml::ajaxButton ("Update data",


                              array('update' => '#data'));



where’s my problem?

no one knows?

please give me such a example but i can’t get result

if someone have something related please help

i googling alot but i can’t find the solution