Bug or configuration problem?

Hi,

Im a user of Yii but i have a small problem that i dont know if it is a bug or a configuration problem.

On my actions of default controllers, i use:

$this->render(‘index’);

But i create an admin module, called ‘admin’, and i create some controller to it, like ‘login’, ‘contents’, …

But on all controllers the $this->render is OK, only in the ‘contents’ controller in ‘admin’ module it render the same page under first if i use $this->render(‘index’), but if i remove this run OK without problem, but when i use $this->render(‘index’) on actions it render the pages 2 times on same screen.

What can be wrong?


CODE WITHOUT PROBLEM:

<?php


class ConteudosController extends AdminController

{

	protected $tituloModulo = 'Conteúdos'; 

    

    public function actionIndex()

	{

		

	}

}

CODE WITH PROBLEM - RENDERING THE PAGE TWO TIMES:

<?php

class ConteudosController extends AdminController

{

protected &#036;tituloModulo = 'Conteúdos'; 





public function actionIndex()


{


	&#036;this-&gt;render('index');


}

}

Anyone help me please.

The page is rendering two times when i use "$this->render" in some controllers.

The problem is not solved, anyone can help me?

Welcome to forum.

So when you remove the render call in “ConteudosController”, the view will get rendered once and everything works like expected. That would mean somewhere else you already do a render() call. Maybe in AdminController? By default Yii doesn’t render anything when you don’t do a render() call.

Hi, thanks for response, the problem is solved here:

My link

Thanks again!