yii2mod / yii2-cms

Simple CMS extension
MIT License
44 stars 23 forks source link

page builder #17

Closed masihfathi closed 7 years ago

masihfathi commented 7 years ago

is it possible to merge this extension "https://github.com/udokmeci/yii2-kont-trevor" to the core of yii2-cms and we have option to choose between simple editor and this page builder extension?

ihorchepurnyi commented 7 years ago

Hi, I think you can use yii2-kont-trevor package with yii2mod-cms together. You only need to create your own views and override this properties:

masihfathi commented 7 years ago

I think we should add a property to module.php which points enabling "yii2-kont-trevor" or not and for rendering "yii2-kont-trevor" in view changing "https://github.com/yii2mod/yii2-cms/blob/master/views/page.php" is necessary. how can i override module.php?

ihorchepurnyi commented 7 years ago

You need to override this property

ihorchepurnyi commented 7 years ago
public function actions()
{
    return [
        'page' => [
            'class' => 'yii2mod\cms\actions\PageAction',
            'view'  => 'custom view',
        ]
    ];
}
masihfathi commented 7 years ago

thanks for replying.