Skip to content

Commit 507574c

Browse files
author
Igor Chepurnoy
authored
Update README.md
1 parent c59a55a commit 507574c

File tree

1 file changed

+21
-24
lines changed

1 file changed

+21
-24
lines changed

README.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -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

7575
3) 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

Comments
 (0)