2017 © Pedro Peláez
 

yii2-extension yii2-lightbox

Lightbox widget for Yii2

image

ramzyvirani/yii2-lightbox

Lightbox widget for Yii2

  • Monday, October 19, 2015
  • by RamzyVirani
  • Repository
  • 1 Watchers
  • 0 Stars
  • 274 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 0 Open issues
  • 3 Versions
  • 10 % Grown

The README.md

Lightbox Widget for Yii 2

  • Lightbox widget based on Lightbox2 extension http://lokeshdhakar.com/projects/lightbox2/

Installation

The preferred way to install this extension is through composer., (*1)

Either run, (*2)

php composer.phar require --prefer-dist ramzyvirani/yii2-lightbox "*"

or add, (*3)

"ramzyvirani/yii2-lightbox": "*"

to the require section of your composer.json., (*4)

Usage

Once the extension is installed, simply add widget to your page as follows:, (*5)

echo Lightbox::widget([
    'files' => [
        [
            'thumb' => 'url/to/thumb.ext',
            'original' => 'url/to/original.ext',
            'title' => 'optional title',
        ],
    ]
]);

To add html options you can use below syntax, (*6)

echo Lightbox::widget([
    'files' => [
        [
            'thumb' => [
                'src'=>'url/to/thumb.ext',
                'htmlOptions' => ['class'=>'col-md-12', 'alt'=>'Alternate Text'] // These options will be applied to Image tag.
            ],
            'original' => [
                'src' => 'url/to/original.ext',
            ]
            'title' => 'optional title',
        ],
    ]
]);

The Versions

19/10 2015

dev-master

9999999-dev

Lightbox widget for Yii2

  Sources   Download

Apache-2.0

The Requires

 

by Ramzy Virani

yii2 module

19/10 2015

1.1

1.1.0.0

Lightbox widget for Yii2

  Sources   Download

Apache-2.0

The Requires

 

by Ramzy Virani

yii2 module

16/10 2015

1.0

1.0.0.0

Lightbox widget for Yii2

  Sources   Download

Apache-2.0

The Requires

 

by Ramzy Virani

yii2 module