Difference between #15 and #16 of
How to display static pages in Yii with database content?

Revision #16 has been created by yasen on Dec 2, 2012, 11:32:57 AM with the memo:

replaced missing variable with $_GET['view']
« previous (#15)

Changes

Title unchanged

How to display static pages in Yii with database content?

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

static pages, database

Content changed

[...]
```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));
}
```
[...]
3 0
13 followers
Viewed: 43 058 times
Version: 1.1
Category: Tutorials
Written by: yasen
Last updated by: yasen
Created on: Oct 11, 2012
Last updated: 11 years ago
Update Article

Revisions

View all history