bariew / yii2-module-abstract-page
Yii2 module for static pages creating.
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- bariew/yii2-dropdown-x: >=1.0.6
- bariew/yii2-imperavi-redactor: dev-master
- bariew/yii2-node-tree: 2.0.*
This package is auto-updated.
Last update: 2024-10-29 04:53:04 UTC
README
Yii2 page module. =================== Description ----------- Module for site "static" pages management. Has admin area for creating pages with WYSIWYG HTML editor and SEO fields. Has subpages feature (they will be available via subpaths like page1/page2/page3). Has JS tree for subpages tree management. Has page menu widget with a multiple dropdown feature. Installation ------------ The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Either run ``` php composer.phar require --prefer-dist bariew/yii2-module-abstract-page "*" ``` or add ``` "bariew/yii2-module-abstract-page": "*" ``` to the require section of your `composer.json` file. Usage ----- * Include 'page' module in the modules config section: ``` 'modules' => [ ... 'page' => [ 'class' => 'bariew\pageAbstractModule\PageModule' ], ], ``` * Add a new routing rule to your url manager in the components config section: ``` 'components' => [ ... 'urlManager' => [ 'rules' => [ [ 'class' => 'bariew\pageAbstractModule\components\UrlRule', 'pattern' => '<url:\\S*>', 'route' => 'page/default/view' ], '<controller>/<action>' => '<controller>/<action>', '<module>/<controller>/<action>' => '<module>/<controller>/<action>', ], ], ], ``` * Apply migrations from the module migrations folder with a console command: ``` ./yii migrate --migrationPath=@vendor/bariew/yii2-module-abstract-page/migrations ``` * Go to page/page/index URL and create some pages. Home page is generated as the root by default.