thyseus/yii2-sitecontent

Tiny sitecontent system for Yii2

Installs: 1 108

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 1

Type:yii2-extension

0.1.0 2017-04-13 09:18 UTC

This package is auto-updated.

Last update: 2024-10-29 05:04:49 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:

License

Yii2-sitecontent is released under the GPLv3 License.