2017 © Pedro Peláez
 

luya-module luya-module-news

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

image

zephir/luya-module-news

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

  • Tuesday, June 19, 2018
  • by nadar
  • Repository
  • 4 Watchers
  • 3 Stars
  • 180 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

LUYA Logo , (*1)

News Module

LUYA Latest Stable Version Tests Maintainability Test Coverage Total Downloads, (*2)

The news module will provided you a basic news system with categories and tags., (*3)

Installation

For the installation of modules Composer is required., (*4)

composer require luyadev/luya-module-news

Configuration

After installation via Composer include the module to your configuration file within the modules section., (*5)

'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

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

1.) Migrate your database., (*7)

./vendor/bin/luya migrate

2.) Import the module and migrations into your LUYA project., (*8)

./vendor/bin/luya import

3.) Add the permissions to your group (Under "System -> Groups" in the LUYA admin interface), (*9)

You will now be able to edit and add news articles., (*10)

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 or enable:, (*11)

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

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:, (*12)

views/news/default/index.php




Latest News Articles

models as $item): ?> <?php /** @var \luya\news\models\Article $item */ ?> <pre> <?php print_r($item->toArray()); ?> </pre> <p> <a href="<?= $item->detailUrl; ?>">News Detail Link</a> </p> = LinkPager::widget(['pagination' => $provider->pagination]); ?>

views/news/default/detail.php

<?php
/** @var \luya\web\View $this  */
/** @var \luya\news\models\Article $model  */
?>
<h1><?= $model->title; ?></h1>
<pre>
<?php print_r($model->toArray()); ?>
</pre>

The above examples will just dump all the data from the model active records., (*13)

The Versions

19/06 2018

dev-master

9999999-dev http://luya.io

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

  Sources   Download

MIT

The Development Requires

php yii2 module yii news luya luya-module

02/01 2018

1.0.2

1.0.2.0 http://luya.io

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

  Sources   Download

MIT

The Development Requires

php yii2 module yii news luya luya-module

01/01 2018

1.0.1

1.0.1.0 http://luya.io

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

  Sources   Download

MIT

php yii2 module yii news luya luya-module

12/12 2017

1.0.0

1.0.0.0 http://luya.io

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

  Sources   Download

MIT

php yii2 module yii news luya luya-module

05/09 2017

1.0.0-RC4

1.0.0.0-RC4 http://luya.io

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

  Sources   Download

MIT

php yii2 module yii news luya luya-module

11/04 2017

1.0.0-RC3

1.0.0.0-RC3 http://luya.io

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

  Sources   Download

MIT

php yii2 module yii news luya luya-module

01/11 2016

1.0.0-RC2

1.0.0.0-RC2 http://luya.io

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

  Sources   Download

MIT

php yii2 module yii news luya luya-module

14/09 2016

1.0.0-RC1

1.0.0.0-RC1 http://luya.io

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

  Sources   Download

MIT

php yii2 module yii news luya luya-module

05/07 2016

1.0.0-beta8

1.0.0.0-beta8 http://luya.io

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

  Sources   Download

MIT

php yii2 module yii news luya luya-module

14/06 2016

1.0.0-beta7

1.0.0.0-beta7 http://luya.io

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

  Sources   Download

MIT

php yii2 module yii news luya luya-module

21/04 2016

1.0.0-beta6

1.0.0.0-beta6 http://luya.io

Yii2 LUYA News

  Sources   Download

MIT

php yii2 module yii news luya