Closed RookieLittle closed 7 years ago
Hi, do you install yii2-basic or advanced?
Hi, i'm using advanced
Install steps:
Install the package: php composer.phar require --prefer-dist yii2mod/yii2-cms "*"
Execute migrations: php yii migrate --migrationPath=@vendor/yii2mod/yii2-cms/migrations
Setup Comments Extension:
3.1 Execute migrations: php yii migrate --migrationPath=@vendor/yii2mod/yii2-comments/migrations
3.2 Add this code to frontend/config/main.php
'modules' => [
'comment' => [
'class' => 'yii2mod\comments\Module',
],
]
3.3 Add this code to backend/config/main.php
'controllerMap' => [
'comments' => 'yii2mod\comments\controllers\ManageController',
]
Add this code to backend/config/main.php
'modules' => [
'admin' => [
'controllerMap' => [
'cms' => 'yii2mod\cms\controllers\CmsController',
],
],
],
Add this code to common/config/main.php
'components' => [
'urlManager' => [
'rules' => [
['class' => 'yii2mod\cms\components\PageUrlRule'],
]
],
],
Add this code to SiteController.php in folder frontend/controllers
public function actions()
{
return [
'page' => [
'class' => 'yii2mod\cms\actions\PageAction',
]
];
}
And now you can create your own pages via admin panel.
hi, i'm a newbie on yii2. i am kinda confuse on the step of adding the code in the config files. Would you mind to guide me step by step on this?
Sorry for any inconvenient and thank you.