News manager

Installs: 32

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 2

Open Issues: 0


1.0.7 2020-01-18 23:12 UTC

This package is auto-updated.

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


Yii2 Github all releases Progress GitHub license GitHub release

Yii2 News

News module for Yii2



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

$ composer require "wdmg/yii2-news"

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

$ php yii news/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-news/migrations


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

'modules' => [
    'news' => [
        'class' => 'wdmg\news\Module',
        'routePrefix' => 'admin',
        'newsRoute'  => '/news', // route for frontend (string or array), use "/" - for root
        'newsLayout' => '@app/views/layouts/main', // the default layout to render news
        'newsImagePath' => '/uploads/news' // the default path to save news thumbnails in @webroot


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.0.7 - Image save bugfix
  • v.1.0.6 - Added support for RSS-feed, Yandex.Turbo and Google AMP modules
  • v.1.0.5 - Added support for Sitemap module