2amigos / yii2-gallery-widget

BlueImp Gallery Widget for Yii2
http://yiiwheels.com
Other
60 stars 37 forks source link

multiple galleries issue #18

Open sahifedp opened 7 years ago

sahifedp commented 7 years ago

Hi I used "yii2-gallery-widget" in a page several times. that is create many id="blueimp-gallery" div (renderTemplate function ran several time) That was conflict in gallery show. I added this code in first of renderTemplate function (in /src/Gallery.php) and problem solved: static $isRendered = false; if ($isRendered) { return ''; } please solve this issue (by this way or better way).

tonydspaniard commented 6 years ago

have you configured the id for the different widgets you display? Can you show me the entire code?

Routhgen commented 4 years ago

@sahifedp Thanks for hotfix. It just works!

The problem is about hardcoded ID & Class #gallery so its impossible to make two galeires e.g. for 2 image categories together. Its overwritten and make this effect of 2 times transparency layer.

Please can anyone implement dynamic generation?