Nested category, post for multilanguage, multidomain site
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist koperdog/yii2-nsblog "*"
or add
"koperdog/yii2-nsblog": "*"
to the require section of your composer.json
file.
and add the module to backend config:
'modules' => [
//...
'blog' => [
'class' => 'koperdog\yii2nsblog\backend\Module',
],
//...
],
Also you need add the module to frontend config:
'modules' => [
//...
'blog' => [
'class' => 'koperdog\yii2nsblog\frontend\Module',
],
//...
],
'urlManager' => [
'rules' => [
[
'class' => 'koperdog\yii2nsblog\components\CategoryUrlRule',
//'prefix' => 'blog'
],
[
'class' => 'koperdog\yii2nsblog\components\PageUrlRule',
//'prefix' => 'blog'
],
],
],
Then you should start the migration (console):
php yii migrate --migrationPath=@vendor/koperdog/yii2-nsblog/migrations
Go to backend /blog/categories or /blog/pages
Also you can clone this repository for create your extension (for example, a store, etc.)