yii2 gallery
original yii2-gallery-module
The preferred way to install this extension is through Composer.
Either run php composer.phar require sadovojav/yii2-gallery-module "dev-master"
or add "sadovojav/yii2-gallery-module": "dev-master"
to the require section of your composer.json
yii migrate —migrationPath=@vendor/sadovojav/yii2-gallery-module/migrations
'modules' => [
'gallery' => [
'class' => 'sadovojav\gallery\Module',
],
],
basePath
= @webroot/galleries
- Base pathqueryCacheDuration
= 86400
- Query cache durationuniqueName
= false
- Generate unique name
'view' => [
'theme' => [
'pathMap' => [
'@sadovojav/gallery/widgets/views' => '@app/web/views/gallery'
],
'baseUrl' => '@web/web'
],
],
Galleries manager - /gallery/gallery/index
<?= \sadovojav\gallery\widgets\Gallery::widget([
'galleryId' => $model->galleryId
]); ?>
galleryId
required - Gallery Idcaption
= false
- Show caption in default templatetemplate
= null
- Your custom widget templateSee here -> https://github.com/sadovojav/yii2-inline-widgets-behavior