@@ -64,35 +64,32 @@ $ php yii migrate --migrationPath=@vendor/yii2mod/yii2-cms/migrations
6464
6565``` php
6666 'components' => [
67- 'urlManager' => [
68- 'rules' => [
69- ['class' => 'yii2mod\cms\components\PageUrlRule'],
70- ]
71- ],
72- ],
67+ 'urlManager' => [
68+ 'rules' => [
69+ ['class' => 'yii2mod\cms\components\PageUrlRule'],
70+ ]
71+ ],
72+ ],
7373```
7474
75753 ) Add to SiteController (or configure via ` $route ` param in ` urlManager ` ):
7676``` php
77- /**
78- * @return array
79- */
80- public function actions()
81- {
82- return [
83- 'page' => [
84- 'class' => 'yii2mod\cms\actions\PageAction',
85- // Also you can override some action properties in following way:
86- 'layout' => 'your custom layout',
87- 'viewPath' => 'your custom view file',
88- // You can set parameters that you want to parse before the page is loaded, for example:
89- 'baseTemplateParams' => [
90- 'homeUrl' => Yii::$app->homeUrl,
91- 'siteName' => Yii::$app->name
92- ]
77+ public function actions()
78+ {
79+ return [
80+ 'page' => [
81+ 'class' => 'yii2mod\cms\actions\PageAction',
82+ // Also you can override some action properties in following way:
83+ 'layout' => 'your custom layout',
84+ 'viewPath' => 'your custom view file',
85+ // You can set parameters that you want to parse before the page is loaded, for example:
86+ 'baseTemplateParams' => [
87+ 'homeUrl' => Yii::$app->homeUrl,
88+ 'siteName' => Yii::$app->name
9389 ]
94- ];
95- }
90+ ]
91+ ];
92+ }
9693```
9794> And now you can create your own pages via admin panel.
9895
0 commit comments