PHPackages                             luyadev/luya-module-news - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. luyadev/luya-module-news

ActiveLuya-module[Utility &amp; Helpers](/categories/utility)

luyadev/luya-module-news
========================

The news module will provided you a basic news system with categories and tags.

4.0.2(4y ago)526.6k19MITPHP

Since Apr 21Pushed 4y ago3 watchersCompare

[ Source](https://github.com/luyadev/luya-module-news)[ Packagist](https://packagist.org/packages/luyadev/luya-module-news)[ Docs](http://luya.io)[ RSS](/packages/luyadev-luya-module-news/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (28)Used By (0)

 [![LUYA Logo](https://raw.githubusercontent.com/luyadev/luya/master/docs/logo/luya-logo-0.2x.png)](https://raw.githubusercontent.com/luyadev/luya/master/docs/logo/luya-logo-0.2x.png)

News Module
===========

[](#news-module)

[![LUYA](https://camo.githubusercontent.com/c30b61934591d3a6fcb8718a93fd61bf840c0abd8a8d49aa0fdd4ab99567bdf4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f776572656425323062792d4c5559412d627269676874677265656e2e737667)](https://luya.io)[![Latest Stable Version](https://camo.githubusercontent.com/74c36cc14fc6607e5c7badb6ee133f5a0c520fd490e723206a6c805d9bbfc843/68747470733a2f2f706f7365722e707567782e6f72672f6c7579616465762f6c7579612d6d6f64756c652d6e6577732f762f737461626c65)](https://packagist.org/packages/luyadev/luya-module-news)[![Tests](https://github.com/luyadev/luya-module-news/workflows/Tests/badge.svg)](https://github.com/luyadev/luya-module-news/workflows/Tests/badge.svg)[![Maintainability](https://camo.githubusercontent.com/a21d5b3e3db149b9670b4c5795d4b2d3b9aa47dd260c7be65f8c4245ab07b772/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f37626130323662633032653235316661316436332f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/luyadev/luya-module-news/maintainability)[![Test Coverage](https://camo.githubusercontent.com/f2aeac790c7cc21bb2a32b26d002959e7d059de36c0e8b10a4101b666be2a3d9/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f37626130323662633032653235316661316436332f746573745f636f766572616765)](https://codeclimate.com/github/luyadev/luya-module-news/test_coverage)[![Total Downloads](https://camo.githubusercontent.com/cc2da10ee3d05de9044c04569370647ba1a7f2edc68ad8c4bad0e0ef51238983/68747470733a2f2f706f7365722e707567782e6f72672f6c7579616465762f6c7579612d6d6f64756c652d6e6577732f646f776e6c6f616473)](https://packagist.org/packages/luyadev/luya-module-news)

The news module will provided you a basic news system with categories and tags.

Installation
------------

[](#installation)

For the installation of modules Composer is required.

```
composer require luyadev/luya-module-news
```

### Configuration

[](#configuration)

After installation via Composer include the module to your configuration file within the modules section.

```
'modules' => [
    // ...
    'news' => [
    	'class' => 'luya\news\frontend\Module',
    	'useAppViewPath' => false, // When enabled the views will be looked up in the @app/views folder, otherwise the views shipped with the module will be used.
    ],
    'newsadmin' => 'luya\news\admin\Module',
]
```

### Initialization

[](#initialization)

After successfully installation and configuration run the migrate, import and setup command to initialize the module in your project.

1.) Migrate your database.

```
./vendor/bin/luya migrate
```

2.) Import the module and migrations into your LUYA project.

```
./vendor/bin/luya import
```

3.) Add the permissions to your group (Under "System -&gt; Groups" in the LUYA admin interface)

You will now be able to edit and add news articles.

With version 2.0 of news module, the admin queue is required in order to switch the visibility of the news based on time, therefore read [LUYA Queue](https://luya.io/guide/app-queue) or enable:

```
'modules' => [
    'admin' => [
        'class' => 'luya\admin\Module',
        // ...
        'autoBootstrapQueue' => true,
    ],
    //...
]
```

Example Views
-------------

[](#example-views)

As the module will try to render a view for the news overview, here is what this could look like this in a very basic way:

#### views/news/default/index.php

[](#viewsnewsdefaultindexphp)

```

Latest News Articles
