thyseus / yii2-sitecontent
Tiny sitecontent system for Yii2
0.1.0
2017-04-13 09:18 UTC
Requires
- karakum/yii2-grid: ^1.0
- marqu3s/yii2-summernote: ^1.0
- yiisoft/yii2: ^2.0.0
- yiisoft/yii2-bootstrap: ^2.0.0
This package is auto-updated.
Last update: 2024-11-29 05:26:32 UTC
README
Small Sitecontent module for the Yii framework.
Can handle different types of sitecontent like:
- blogposts
- sitecontent
- emails
It uses the Summernote (http://summernote.org/) WYSIWYG Editor.
Installation
$ composer require thyseus/yii2-sitecontent
$ php yii migrate/up --migrationPath=@vendor/thyseus/yii2-sitecontent/migrations
Configuration
Add following lines to your main configuration file:
'modules' => [
'sitecontent' => [
'class' => 'thyseus\sitecontent\Module',
'modelClass' => '\app\models\User', // optional. your User model. Needs to be ActiveRecord.
],
],
By default only users that apply to $user->can('admin') are allowed to access the sitecontent administation. You can modify this with the 'accessCallback' configuration option.
Routes
Use the following routes to access the sitecontent module:
- index: https://your-domain/sitecontent/sitecontent/index
- view: https://your-domain/sitecontent/sitecontent/view?id=
- view: https://your-domain/sitecontent/sitecontent/view?id=
License
Yii2-sitecontent is released under the GPLv3 License.