PHPackages                             yii2mod/yii2-cms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. yii2mod/yii2-cms

ActiveYii2-extension[Framework](/categories/framework)

yii2mod/yii2-cms
================

Yii2 CMS extension

1.9.2(8y ago)439.3k23[4 issues](https://github.com/yii2mod/yii2-cms/issues)2MITPHPPHP &gt;=7.0.0CI failing

Since Jul 10Pushed 6y ago10 watchersCompare

[ Source](https://github.com/yii2mod/yii2-cms)[ Packagist](https://packagist.org/packages/yii2mod/yii2-cms)[ RSS](/packages/yii2mod-yii2-cms/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (21)Used By (2)Security (1)

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft)

Yii2 CMS Extension
==================

[](#yii2-cms-extension)

This module provides a web interface for content management system and includes the following features:

- Allows CRUD operations for pages
- [Support Markdown Editor](https://github.com/yii2mod/yii2-markdown)
- [Support Froala Editor](https://www.froala.com/wysiwyg-editor)
- [Support Comments Management System](https://github.com/yii2mod/yii2-comments)
- Integrated with [yii2mod/base](https://github.com/yii2mod/base)

[![Latest Stable Version](https://camo.githubusercontent.com/e828cffc3d59c6d84a11d958b953a06c289304c1f51563f2f15fe008ebfed3af/68747470733a2f2f706f7365722e707567782e6f72672f796969326d6f642f796969322d636d732f762f737461626c65)](https://packagist.org/packages/yii2mod/yii2-cms)[![Total Downloads](https://camo.githubusercontent.com/c48715b7f7e373d23140e1929e2df1fb24327d56cb223efc34ee12d62e5433c7/68747470733a2f2f706f7365722e707567782e6f72672f796969326d6f642f796969322d636d732f646f776e6c6f616473)](https://packagist.org/packages/yii2mod/yii2-cms)[![License](https://camo.githubusercontent.com/0dbcadd095ab2a91cdbf5c5b3104b8ab182f2c9b2ea8a09185a37dd1751a0006/68747470733a2f2f706f7365722e707567782e6f72672f796969326d6f642f796969322d636d732f6c6963656e7365)](https://packagist.org/packages/yii2mod/yii2-cms)[![Build Status](https://camo.githubusercontent.com/e8744107ad9006d7d4a82934720dd9357ae2e84850a6889e3fb84bcff5c2bfd5/68747470733a2f2f7472617669732d63692e6f72672f796969326d6f642f796969322d636d732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/yii2mod/yii2-cms)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist yii2mod/yii2-cms "*"
```

or add

```
"yii2mod/yii2-cms": "*"

```

to the require section of your composer.json.

CONFIGURATION
-------------

[](#configuration)

**Database Migrations**

Before usage this extension, we'll also need to prepare the database.

```
$ php yii migrate --migrationPath=@vendor/yii2mod/yii2-comments/migrations
$ php yii migrate --migrationPath=@vendor/yii2mod/yii2-cms/migrations
```

**Module Setup**

To access the module, you need to configure the modules array in your application configuration:

```
'modules' => [
    'cms' => [
        'class' => 'yii2mod\cms\Module',
    ],
],
```

> **You can then access to management section through the following URL:**

>

**Configure Url Manager**

You need to configure the `urlManager` array in your application configuration:

```
 'components' => [
     'urlManager' => [
         'rules' => [
             ['class' => 'yii2mod\cms\components\PageUrlRule'],
         ]
     ],
 ],
```

**Setup Page Action**

Add to SiteController (or configure via `$route` param in `urlManager`):

```
public function actions()
{
    return [
        'page' => [
            'class' => 'yii2mod\cms\actions\PageAction',
        ]
    ];
}
```

**Now you can use this module with all available features.**

Features:
---------

[](#features)

1. By default this extension uses the `froala editor` for manage cms pages, you can change editor configuration by the following code:

> List of options:

> Configuration example:

```
'modules' => [
    'cms' => [
        'class' => 'yii2mod\cms\Module',
        'froalaEditorOptions' => [
            // your custom configuration
            'clientPlugins' => [
            ],
            'clientOptions' => [
            ],
            'excludedPlugins' => [
            ],
        ],
    ],
],
```

2. Markdown Editor support:

```
'modules' => [
    'cms' => [
        'class' => 'yii2mod\cms\Module',
        'enableMarkdown' => true,
        // List of options: https://github.com/NextStepWebs/simplemde-markdown-editor#configuration
        'markdownEditorOptions' => [
            'showIcons' => ['code', 'table'],
        ],
    ],
],
```

3. You can insert your own widget on the page by the following steps:

- Create the widget, for example:

```
namespace app\widgets;

use yii\base\Widget;

class MyWidget extends Widget
{
   /**
    * @inheritdoc
    */
   public function run()
   {
       parent::run();

       echo 'Text from widget';
   }

   /**
    * This function used for render the widget
    *
    * @return string
    */
   public static function show()
   {
       return self::widget();
   }
}
```

- When you create the page via admin panel add the following code to the page content:

```
 [[\app\widgets\MyWidget:show]]

```

4. You can use parameters in your page content, for example: {siteName}, {homeUrl}. For parsing this parameters you can use the `baseTemplateParams` property:

```
public function actions()
{
    return [
        'page' => [
            'class' => 'yii2mod\cms\actions\PageAction',
            'baseTemplateParams' => [
               'homeUrl' => 'your site home url',
               'siteName' => Yii::$app->name
            ]
        ],
    ];
}
```

5. You can change comments module settings by the following code:

```
public function actions()
{
    return [
        'page' => [
            'class' => 'yii2mod\cms\actions\PageAction',
            'commentWidgetParams' => [
                'maxLevel' => 1,
                'dataProviderConfig' => [
                    'pagination' => [
                        'pageSize' => 10
                    ],
                ],
            ]
        ]
    ];
}
```

> For detail information about comments module please visit the following [page](https://github.com/yii2mod/yii2-comments)

Support us
----------

[](#support-us)

Does your business depend on our contributions? Reach out and support us on [Patreon](https://www.patreon.com/yii2mod). All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~45 days

Recently: every ~55 days

Total

20

Last Release

3090d ago

PHP version history (3 changes)1.6PHP &gt;=5.5

1.8PHP &gt;=5.6

1.9.2PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a53a15e1548ce60ee92591e71492a39eaaecfc88eaa1a9d7f353d5c910381de?d=identicon)[disem](/maintainers/disem)

---

Top Contributors

[![dmitry-semenov](https://avatars.githubusercontent.com/u/17027799?v=4)](https://github.com/dmitry-semenov "dmitry-semenov (18 commits)")[![sergeybochkarev](https://avatars.githubusercontent.com/u/12495728?v=4)](https://github.com/sergeybochkarev "sergeybochkarev (2 commits)")[![kravchukdim](https://avatars.githubusercontent.com/u/10596426?v=4)](https://github.com/kravchukdim "kravchukdim (1 commits)")[![lexxorlov](https://avatars.githubusercontent.com/u/7910574?v=4)](https://github.com/lexxorlov "lexxorlov (1 commits)")[![masihfathi](https://avatars.githubusercontent.com/u/13271510?v=4)](https://github.com/masihfathi "masihfathi (1 commits)")[![philippfrenzel](https://avatars.githubusercontent.com/u/2319890?v=4)](https://github.com/philippfrenzel "philippfrenzel (1 commits)")

---

Tags

yii2yii2-cmsyii2-cms-moduleyii2-extensionyii2yii2 cmsyii2-cms-module

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/yii2mod-yii2-cms/health.svg)

```
[![Health](https://phpackages.com/badges/yii2mod-yii2-cms/health.svg)](https://phpackages.com/packages/yii2mod-yii2-cms)
```

###  Alternatives

[yiisoft/yii2-apidoc

API Documentation generator for the Yii framework 2.0

257701.8k31](/packages/yiisoft-yii2-apidoc)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[feehi/cms

Feehi CMS Project Template

5323.0k](/packages/feehi-cms)[izyue/yii2-app-advanced

Yii 2 Advanced Project Template

1281.9k](/packages/izyue-yii2-app-advanced)[yii2mod/base

Base application template for Yii2

531.3k](/packages/yii2mod-base)[schallschlucker/yii2-simple-cms

a basic yii2 content management extension for easily creating and maintaining a page structure for frontend use

441.5k](/packages/schallschlucker-yii2-simple-cms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
