Download the PHP package nullref/yii2-cms without Composer
On this page you can find all versions of the php package nullref/yii2-cms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-cms
Content Management Module for Yii2
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Run command php yii module/install nullref/yii2-cms
to install this module. It will be added to your application config (@app/config/installed_modules.php
)
Concept
This module allows you to build dynamic pages which consist of blocks (widget with config). You can create custom widgets and register it in BlockManager.
Also you can create pages with html content by WYSIWYG CKEditor.
User Guide
BlockManager
This component contains information about available blocks. You can override it:
and add in your class own blocks:
To register block at runtime:
LinkManager
This component is used for unified access to links of different resources (e.g. page or categories). Manager can generate link to resource by it type and id. If you want to add own type of links you need to add link provider to this manager by definition container (DI). For example:
Each link provider must to impelement LinkProvider interface.
As result you can use this manager to generate link in your widgets or other application parts. E.g:
Block structure convention
A valid block is represented by a folder with two classes:
- Block - define data block to use
- Widget - run with data when this block use on page
In most cases form file will also be in this folder
When you add own block you have to set unique id and namespace of block files folder.
Single block usage
You can use cms blocks on you own views, to call by id:
Pages
This module allows to create pages with custom content and set custom url for it.
By default all pages are available by route /pages/<route>
, but you can override it by config:
By default you can set meta tags for each page. Default tags are:
- title
- description
- keywords
- robots
You can override method getMetaTypesList
in Page model class (see below) to extend it.
Overriding
-
Models and ActiveQueries:
- Controllers:
Admin Panel
You can use this module with Yii2 Admin module.
All versions of yii2-cms with dependencies
yiisoft/yii2-jui Version ~2.0.0
mihaildev/yii2-ckeditor Version *
mihaildev/yii2-elfinder Version *
nullref/yii2-useful Version *
nullref/yii2-core Version *
bower-asset/owl.carousel Version 2.*
trntv/yii2-aceeditor Version *
unclead/yii2-multiple-input Version >=1.2.10
wbraganca/yii2-fancytree-widget Version 1.0.1
rmrevin/yii2-fontawesome Version ^2.16