How to display static pages in Yii with database content?

Comparing #15 with #16

Revision #16 was created by yasen yasen on Dec 2, 2012, 11:32:57 AM.

replaced missing variable with $_GET['view']

Content

[...]
```php
public function actionPage() {
if(empty($_GET['view']))
$this->actionIndex();
$model = Spage::model()->findByUrl($_GET['view']);
// if page is not found, then run a controller
 with that name if ($model === NULL) Yii::app()->runController($controller_GET['view']);
else
$this->render('pages/spage', array('model'=>$model));
}
```
[...]