nill/yii2-latest-news-widget

There is no license information available for the latest version (dev-master) of this package.

Yii2-Start Latest News Widget

dev-master 2014-11-16 13:52 UTC

This package is not auto-updated.

Last update: 2025-07-01 12:24:05 UTC


README

Latest News Widget for Yii2-Start application. Displays a set number the latest blog posts.

Requirements

This module is used with Yii2-Start application yii2-start.

Installation

Install via Composer

The preferred way to install this extension is through composer.

Either run

php composer.phar require nill/yii2-latest-news-widget "dev-master"

or add

"nill/yii2-latest-news-widget": "dev-master"

to the require section of your composer.json file.

Install from an Archive File

Download and extract the zip-file into the folder with your project

/my/path/to/yii2-start/vendor/nill/yii2-latest-news-widget

Configuration

  • Add module to extensions "vendor\yiisoft\extensions.php":
'nill/widget-latest-news' => 
array (
    'name' => 'nill/yii2-latest-news-widget',
    'version' => '0.1.0.0',
    'alias' => 
    array (
        '@nill/widgetapn' => $vendorDir . '/nill/yii2-latest-news-widget',
    ),
),

Usage

<?= Widgetapn::widget([
    'limit' =>2 // limit of displayed news
]) ?>