Passing variables between layout

Hello, I just started using Yiic framework and would like to know how to pass variable from controller to layout.

Questions:

  1. I’m using a controller that uses the default column1.php layout that uses the main layout file. Is there a way for me to declare a php variable in the main.php layout file and gets used in the column1.php file. Or is there a way for me to pass data from the controller to the main.php layout files? I’m trying to set the asset url in main.php but it doesn’t carried to column1.php.

Thanks!

Check this similar thread - http://www.yiiframework.com/forum/index.php?/topic/4473-

I ended up putting some frequent logic in a base controller class, like explained in this wiki article:

http://www.yiiframework.com/wiki/54/simplified-meta-tags/

But pretty much like in the topic linked to.