PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Gabriel Alejandro López López   Yii2 Static Pages Module   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Yii2 Static Pages Module
Generate static pages for a Yii2 Web application
Author: By
Last change:
Date: 8 days ago
Size: 2,189 bytes
 

Contents

Class file image Download

StaticPages

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Module to manage static pages in a Yii2 application

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist daxslab/yii2-staticpages-module "*"

or add

"daxslab/yii2-staticpages-module": "*"

to the require section of your composer.json file.

Database Migration

./yii migrate --migration-path="@daxslab/staticpages/migrations"

Configuration

In the backend configure the Page module by the following:

'modules' => [
    //...   
    'staticpages' => [
        'class' => daxslab\staticpages\Module::class,
        'controllerNamespace' => 'daxslab\staticpages\controllers\backend',
        // you can setup any InputWidget subclass as text editor
        'editorConfig' => [
            'class' => yii2mod\markdown\MarkdownEditor\MarkdownEditor::class,
        ];
    ],
    //...
]

And in frontend:

'modules' => [
    //...   
    'staticpages' => [
            'class' => daxslab\staticpages\Module::class,
            'controllerNamespace' => 'daxslab\staticpages\controllers\frontend',
            // you can specify a different view path for better matching your style
            'viewPath' => '@frontend/views/',
        ],
    //...
]

Proudly made by Daxslab.