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

			'page'=>array(

				'class'=>'CViewAction',

			),



In manual i have found:




return array(

    'action1'=>'path.to.Action1Class',

    'action2'=>array(

        'class'=>'path.to.Action2Class',

        'property1'=>'value1',

        'property2'=>'value2',

    ),

);



But seems to me it does not work with CViewAction ?

because in CViewAction.php:141




				$controller->render($this->view);



$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()

{

   ...

    $controller->render($this->view,$data); 

   ...

} 




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

Thanks.