Pass variables to static page

Is there any wau how to pass variables to static pages ?

			// page action renders "static" pages stored under 'protected/views/site/pages'

			// They can be accessed via: index.php?r=site/page&view=FileName




In manual i have found:

return array(








But seems to me it does not work with CViewAction ?

because in CViewAction.php:141


$data is not passed :(

So there is only one way to pass data in such view is assigne it to Controller’s property ?

I understand that static page it’s page almost all time with static content… but sometimes it would be good to pass there some variables data.

It should be easy to implement your own viewaction-component that extends CViewAction.

You can add the property data and override the run method

public $data = array();


public function run()






Yep it is. I just thought that there is any built in approach. In this case documentation should be adjusted.