Manage static application pages

Installs: 23

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 2

Open Issues: 0


1.1.9 2020-01-19 22:37 UTC

This package is auto-updated.

Last update: 2020-02-16 16:52:23 UTC


Yii2 Github all releases Progress GitHub license GitHub release

Yii2 Pages

Static pages manager



To install the module, run the following command in the console:

$ composer require "wdmg/yii2-pages"

After configure db connection, run the following command in the console:

$ php yii pages/init

And select the operation you want to perform:

  1. Apply all module migrations
  2. Revert all module migrations


In any case, you can execute the migration and create the initial data, run the following command in the console:

$ php yii migrate --migrationPath=@vendor/wdmg/yii2-pages/migrations


To add a module to the project, add the following data in your configuration file:

'modules' => [
    'pages' => [
        'class' => 'wdmg\pages\Module',
        'routePrefix' => 'admin',
        'pagesRoute'  => '/pages', // route for frontend (string or array), use "/" - for root
        'pagesLayout' => '@app/views/layouts/main' // path to default layout for render in frontend


Use the Module::dashboardNavItems() method of the module to generate a navigation items list for NavBar, like this:

    echo Nav::widget([
    'options' => ['class' => 'navbar-nav navbar-right'],
        'label' => 'Modules',
        'items' => [

Status and version [ready to use]

  • v.1.1.9 - Added multiple nesting for pages
  • v.1.1.8 - Added support for Yandex.Turbo and Google AMP modules
  • v.1.1.7 - Added support for Sitemap module