diplodok / yii2-unitegallery-widget
基于 Unite Gallery 的最简单小部件
v1.1.9
2018-08-30 14:21 UTC
Requires
- yiisoft/yii2: *
README
基于 Unite Gallery 的最简单小部件。支持输出 mp4 格式的图像和视频。
安装
安装此扩展的首选方式是通过 composer。
运行
php composer.phar require --prefer-dist diplodok/yii2-unitegallery-widget "~1.0.0"
或在您的 composer.json
文件的 require 部分中添加
"diplodok/yii2-unitegallery-widget": "~1.0.0"
to the require section of your composer.json
file.
使用
扩展安装后,只需在您的代码中使用它即可
<?= \diplodok\Gallerywidget\GalleryWidget::widget([ 'title_gallery' => 'Заголовок', // опция 'theme' => 'grid', // опция (по умолчанию тема grid) 'photos' => [ ['thumb' => '/thumb/images/1.jpg', 'src' => '/images/1.jpg', 'alt' => '', 'description' => 'опция'], ['thumb' => '/thumb/images/2.jpg', 'src' => '/images/2.jpg', 'alt' => '', 'description' => 'опция'], ['thumb' => '/thumb/images/video.jpg', 'src' => '/video/video.mp4', 'alt' => '', 'description' => 'опция'] ]); ?>
主题:grid, tiles, tilesgrid, slider, default, compact, carousel