dev-master
9999999-devYii2 view pages
MIT
The Requires
extension yii2 view pages
v0.1
0.1.0.0Yii2 view pages
MIT
The Requires
extension yii2 view pages
Yii2 view pages
Yii2 view pages, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist fgh151/yii2-view-pages "*"
or add, (*4)
"fgh151/yii2-view-pages": "*"
to the require section of your composer.json
file., (*5)
Once the extension is installed, simply add it in your config by :
Basic config/web.php
, (*6)
Advanced [backend|frontend|common]/config/main.php
, (*7)
'modules' => [ 'pages' => [ 'class' => 'fgh151\vpages\Module', ], //... ]
Create php file in @webroot directory or sub folder, for example, (*8)
Yii::getAlias('@webroot').'/catalog/index.php';
Now you have urls:, (*9)
?r=pages/page/view&page=catalog/index.php
?r=pages/page/view&page=catalog/
?r=pages/page/view&page=catalog
For SEF url you may add rule to config:, (*10)
'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ '<page:\w+>' => 'pages/page/view', ], ],
If there is files style.css
or script.js
in view dir (/catalog/
as example above) they will be automatically added., (*11)
You can use RBAC with module. Simply add it in your config:, (*12)
'modules' => [ 'pages' => [ 'class' => 'fgh151\vpages\Module', 'as access' => [ 'class' => 'yii\filters\AccessControl', 'rules' => [ [ 'allow' => true, 'roles' => ['admin'], ] ] ] ] ... ... ],
Yii2 view pages
MIT
extension yii2 view pages
Yii2 view pages
MIT
extension yii2 view pages