Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/luyadev/luya-module-gallery

Galleries Module
https://github.com/luyadev/luya-module-gallery

Last synced: about 1 month ago
JSON representation

Galleries Module

Awesome Lists containing this project

README

        


LUYA Logo

# Gallery Module

[![LUYA](https://img.shields.io/badge/Powered%20by-LUYA-brightgreen.svg)](https://luya.io)
[![Latest Stable Version](https://poser.pugx.org/luyadev/luya-module-gallery/v/stable)](https://packagist.org/packages/luyadev/luya-module-gallery)
[![Total Downloads](https://poser.pugx.org/luyadev/luya-module-gallery/downloads)](https://packagist.org/packages/luyadev/luya-module-gallery)
[![Slack Support](https://img.shields.io/badge/Slack-luyadev-yellowgreen.svg)](https://slack.luya.io/)

The gallery module allows you create folders and collection and upload images to the collections. Its an easy way to create a gallery very quick and create your own view files.

## Installation

For the installation of modules Composer is required.

```sh
composer require luyadev/luya-module-gallery
```

### Configuration

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

```php
'modules' => [
// ...
'gallery' => [
'class' => 'luya\gallery\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.
],
'galleryadmin' => 'luya\gallery\admin\Module',
]
```
### Initialization

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

1.) Migrate your database.

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

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

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

## View files

As the modules are not shipped with default view files you can use the following examples:

#### cat/index.php

```php


= $item->title; ?>


Alben anzeigen

```

#### alben/index.php

```php



= $item->title; ?>


= $item->description; ?>


= $item->detailLink; ?>


```

#### album/index.php

```php


= $model->title; ?>


= $model->description; ?>


= $model->detailLink; ?>

Bilder



albumImages as $image): ?>





```