From the Yii demo, I can see using the following code to attach the CViewAction plugin to a controller
public function actions() {
... // 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',
)
...}
After it’s attached. how do you use the ‘page’ action to display a static html page? Can you give me a code example? Thank you!
If my question is too easy that offends you, I am very sorry about it. I may miss something, and may ask questions which already has well documented answer. But I read the two links you provided again, and still couldn’t understand how to use ‘page’ action to display a static page.
Here it talks about GET, but I still have no clue how to display a static page.
There is NO example and I couldn’t understand the class reference without code example!
echo CHtml::link('See About Page', array('site/page', 'view'=>'about'));
I think view is the parameter to pass to ‘page’ action, and view is a member property of CViewAction. It’s the part that confused me before. The class reference talks about GET, but I have no idea how to specify a GET parameter.