slavkovrn/yii-prettyphoto Yii prettyPhoto image galary widget uses Lightbox view control jquery.prettyphoto.js

PrettyPhoto image galary widget for Yii 1 Framework

  1. Installation
  2. Usage

The extension uses jQuery PrettyPhoto and makes image galary from php array of structure defined.

PrettyPhoto image galary PHP Array generator.

PrettyPhoto image galary

Installation

The preferred way to install this extension is through composer.

Either run:

composer require slavkovrn/yii-prettyphoto:dev-master

or add

"slavkovrn/yii-prettyphoto": "dev-master"

to the require section of your composer.json file.

Usage

Set link to extension in your view:

<?php $this->widget(slavkovrn\prettyphoto\PrettyPhotoWidget::class,[
    'id'     =>'prettyPhoto',   // id of plugin should be unique at page
    'images' => [               // images at popup window of prettyPhoto galary
        1 => [
                'src' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image1.jpg',
                'thumb' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image1.jpg',
                'title' => 'Image visible in widget',
            ],
        2 => [
                'src' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image2.jpg',
                'thumb' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image2.jpg',
                'title' => 'image 1',
            ],
        3 => [
                'src' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image3.jpg',
                'thumb' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image3.jpg',
                'title' => 'image 2',
            ],
        4 => [
                'src' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image4.jpg',
                'thumb' => 'http://yii2.kadastrcard.ru/uploads/prettyphoto/image4.jpg',
                'title' => 'image 3',
            ],
    ]
]); ?>

write comments to admin

0 0
2 followers
3 downloads
Yii Version: Unknown
License: BSD-3-Clause
Category: User Interface
Developed by: Viacheslav Kolesnikov
Created on: Jun 24, 2018
Last updated: (not set)
Packagist Profile
Github Repository