daxslab / yii2-staticpages-module
Module to manage static pages in a Yii2 application
Installs: 133
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-10-23 08:26:16 UTC
README
Module to manage static pages in a Yii2 application
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist daxslab/yii2-staticpages-module "*"
or add
"daxslab/yii2-staticpages-module": "*"
to the require section of your composer.json
file.
Database Migration
./yii migrate --migration-path="@daxslab/staticpages/migrations"
Configuration
In the backend configure the Page module by the following:
'modules' => [ //... 'staticpages' => [ 'class' => daxslab\staticpages\Module::class, 'controllerNamespace' => 'daxslab\staticpages\controllers\backend', // you can setup any InputWidget subclass as text editor 'editorConfig' => [ 'class' => yii2mod\markdown\MarkdownEditor\MarkdownEditor::class, ]; ], //... ]
And in frontend:
'modules' => [ //... 'staticpages' => [ 'class' => daxslab\staticpages\Module::class, 'controllerNamespace' => 'daxslab\staticpages\controllers\frontend', // you can specify a different view path for better matching your style 'viewPath' => '@frontend/views/', ], //... ]
Proudly made by Daxslab.