public function actionSucesso($id)
{
$model=$this->loadModel($id);
$criteria = new CDbCriteria();
$criteria->order = 'id DESC';
$count=Frase::model()->count($criteria);
$pages=new CPagination($count);
// results per page
$pages->pageSize=10;
$pages->applyLimit($criteria);
$listafrase = Frase::model()->findAll($criteria);
//d($model);
$this->render('sucesso', array('model'=>$model,'listaFrase'=>$listafrase,'pages'=>$pages));
}
NOTE: d() is just a custom dumping function.
This is a function inside ParticipeController.php, it functions fine for calling the view "sucesso" and rendering it. That is then passed the result as $content to my theme/layout gjmain.php. But when I try to use $model inside my gjmain.php it informs me that the variable is undefined.
So besides the obvious question "why is it undefined?" should it not pass those variable to gjmain as well? I am curious how it is calling gjmain, is that the default behavior for the render() (just to confirm my doubts)? Another questions that baffles me is why does gjmain render properly (passing values) for other parts of the site but fails here?
If by chance I have overlooked a previous topic, please forgive me. Thanks for your time!

Help













