2017 © Pedro Peláez
 

yii2-extension yii2-pages

Module implements CRUD with static pages with uses Imperavi Redactor.

image

khr/yii2-pages

Module implements CRUD with static pages with uses Imperavi Redactor.

  • Tuesday, February 20, 2018
  • by khristenkoyura
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 14 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

yii2-pages

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Module implements CRUD with static pages with uses Imperavi Redactor., (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist bupy7/yii2-pages "*"

or add, (*5)

"bupy7/yii2-pages": "*"

to the require section of your composer.json file., (*6)

Installation

Add module to your config file:, (*7)

'modules' => [
    ...

    'pages' => [
        'class' => 'bupy7\pages\Module',
    ],
]

By default module uses table name '{{%page}}'. If in your database this table is exist - change it adding to configuration of module new table name:, (*8)

'modules' => [
    ...

    'pages' => [
        'class' => 'bupy7\pages\Module',
        'tableName' => '{{%your_table_name}}',
    ],
]

Run migration, (*9)

./yii migrate/up --migrationPath=@bupy7/pages/migrations

Usage

In module two controllers: default and manager., (*10)

manager need for control the pages out of the control panel. You need protect it controller via controllerMap or override it for add behavior with AccessControl., (*11)

Example:, (*12)

'modules' => [
    ...

    'pages' => [
        ...

        'controllerMap' => [
            'manager' => [
                'class' => 'bupy7\pages\controllers\ManagerController',
                'as access' => [
                    'class' => AccessControl::className(),
                    'rules' => [
                        [
                            'allow' => true,
                            'roles' => ['admin'],
                        ],
                    ],
                ],
            ],
        ],
    ],
],

default for display of pages to site. You need add url rules to file of config for getting content via aliases pages., (*13)

Example:, (*14)

'urlManager' => [
    'rules' => [
        ...

        'pages/<page:[\w-]+>' => 'pages/default/index',
    ],
],

You can upload and add files/images via Imperavi Redactor, if enable it:, (*15)

'modules' => [
    ...

    'pages' => [
        ...

        'pathToImages' => '@webroot/images',
        'urlToImages' => '@web/images',
        'pathToFiles' => '@webroot/files',
        'urlToFiles' => '@web/files',
        'uploadImage' => true,
        'uploadFile' => true,
        'addImage' => true,
        'addFile' => true,
    ],
],

Set up the custom language at Imperavi redactor:, (*16)

'modules' => [
    ...

    'pages' => [
        'class' => 'bupy7\pages\Module',
        'imperaviLanguage' => 'es',
    ],
]

There is all list a languages here: /vendor/vova07/yii2-imperavi-widget/src/assets/lang., (*17)

License

yii2-pages is released under the BSD 3-Clause License., (*18)

The Versions

20/02 2018

dev-master

9999999-dev https://github.com/bupy7/yii2-pages

Module implements CRUD with static pages with uses Imperavi Redactor.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 module pages static

20/02 2018

dev-patch-1

dev-patch-1 https://github.com/bupy7/yii2-pages

Module implements CRUD with static pages with uses Imperavi Redactor.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 module pages static

08/04 2016

1.2.0

1.2.0.0 https://github.com/bupy7/yii2-pages

Module implements CRUD with static pages with uses Imperavi Redactor.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 module pages static

06/04 2016

1.1.4

1.1.4.0 https://github.com/bupy7/yii2-pages

Module implements CRUD with static pages with uses Imperavi Redactor.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 module pages static

22/03 2016

1.1.3

1.1.3.0 https://github.com/bupy7/yii2-pages

Module implements CRUD with static pages with uses Imperavi Redactor.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 module pages static

11/03 2016

1.1.2

1.1.2.0 https://github.com/bupy7/yii2-pages

Module implements CRUD with static pages with uses Imperavi Redactor.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 module pages static

07/03 2016

1.1.1

1.1.1.0 https://github.com/bupy7/yii2-pages

Module implements CRUD with static pages with uses Imperavi Redactor.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 module pages static

29/12 2015

1.1.0

1.1.0.0 https://github.com/bupy7/yii2-pages

Module implements CRUD with static pages with uses Imperavi Redactor.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 module pages static

04/05 2015

1.0.0

1.0.0.0 https://github.com/bupy7/yii2-pages

Module implements CRUD with static pages with uses Imperavi Redactor.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 module pages static