php - How can we have Static website on front end Yii -


i want create website in 2 modules 1st 5 static pages existing website. want add database , login access other pages other module. how can use existing website on first load clicking sign in redirect other module. i'm using yii 1.1.14

first, in default sitecontroller (or other controller if like), override actions() method follows,

public function actions() {     return array(         'page'=>array(             'class'=>'cviewaction',         ),     ); } 

second, create folder protected/views/site/pages.

third, save each static page php file under folder. example, can save "about site" page about.php. note, these pages use application's default layout. therefore, main content needs saved in each file.

we done! access static page, e.g., page, can use following url:

http://www.example.com/index.php?r=site/page&view=about

more detail in : http://www.yiiframework.com/wiki/22/how-to-display-static-pages-in-yii/


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -