Changes
Title
unchanged
Avoiding duplicate script download when using Ajax calls to render different Views
Category
unchanged
Tips
Yii version
unchanged
Tags
unchanged
tutorial, AJAX, views
Content
changed
[...]
if($r->getIsAjaxRequest())
{
// now we render the views without the need to process
// output anymore
$this->renderPartial($view,array('model'=>$model));
Yii::app()->end();
}
$this->render('index', array('model'=>$model,'view'=>$view));
}
```[...]