Dynamic Titles in Layout

Hello I’m from Argentina

and I have a problem with the “views” in Yii I’m a noob.

the problem is how can I "configure" the page titles.(and other variables)

I come from Kohana and in KO I put <title><?php echo $this->titulo; ?></title> and in the controller action


controller

     action...

       $this->titulo = "blah blah blah";

       $this->render('view',vars....);

....

and this is all… i read in Yii if not possible pass variables from action to layout

because the action vars are local but the problem is when I see in google

google penalty my site because 2 pages have a same title and i need for example

obtain the page title from a database.

if probably I don’t understand the views on yii but where is a tutorial with the explain step by step or something like this.

or if you can tell me how is the "key" or "the method" to work well in Yii with the views I will be happy

sorry my bad inglish but I speek spanish xD TNX!

I think this is what you want:




$this->pageTitle='blah blah blah';



/Tommy

No this is not the solution because if I this something like this the FW show me an error page with

controllerxxxxx.titulo property no exist or something like that… properti not set…

:(

it’s not “titulo”, it’s pageTitle!




<title><?php echo $this->pageTitle; ?></title>