I am having issues rendering a view via an ajaxLink. I am a newbie to Yii, but experienced with php.
Here are the relevant parts of my code:
–update.php–
<div class="EditMenuItem" id="Basic">
<?php echo CHtml::ajaxLink('Basic Information', $base . "/index.php?r=/stylist/updateBasic",
array('update' => '#Update'))
?>
</div>
–StylistController.php–
public function actionUpdateBasic() {
$email = Yii :: app()->user->id;
$user = User :: model()->findByAttributes(array("email" => $email));
$stylist = Stylist :: model()->findByPk($user->id);
if (isset($_POST['User']) and isset($_POST['Stylist'])):
$user->attributes = $_POST['User'];
$stylist->attributes = $_POST['Stylist'];
$user->save();
$stylist->save();
endif;
$this->renderPartial('_basic', array('user'=>$user, 'stylist'=>$stylist), false, true);
Yii::app()->end();
}
–_basic.php–
just contains an ActiveForm widget. (screenshot = "output.png")
I would like the contents of the loaded view, _basic.php, to receive styles from form.css that I have already loaded in my main.php layout.