Latest News Widget for Yii2-Start application.
Displays a set number the latest blog posts., (*1)
Requirements
This module is used with Yii2-Start application
yii2-start., (*2)
Installation
Install via Composer
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require nill/yii2-latest-news-widget "dev-master"
or add, (*5)
"nill/yii2-latest-news-widget": "dev-master"
to the require section of your composer.json
file., (*6)
Install from an Archive File
Download and extract the zip-file into the folder with your project, (*7)
/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
]) ?>