Plugin for Joomla developers. It allows you to use PhotoSwipe anywhere in Joomla 4: in modules, components, plugins.
To do this in your code, use
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();\n$wa->useScript('photoswipe')\n->useScript('photoswipe-lightbox')\n->useStyle('photoswipe');
At the moment, only the photoswipe
the library is functional on the view.
It is also necessary to place the initialization and configuration JS into the view according to the documentation Doc PhotoSwipe
Example of embedded code in demo view (player photos in slideshow):
var lightbox = new PhotoSwipeLightbox({
gallery: '#gallery-player',
children: 'a',
bgOpacity: 0.95,
// dynamic import is not supported in UMD version
pswpModule: PhotoSwipe
});
lightbox.init();
Player photos are displayed in the Lightbox popup and Slideshow, all using the PhotoSwipe library (which is also part of the Phoca Gallery app, among others).
This plugin is designed especially for developers of Joomla! 4. Registers the Photoswipe package in the Joomla Web Resource Manager. Then you can use it in your extensions - components, modules, plugins.
Thanks to this plugin, you can start using Lightbox and Slideshow for photo gallery in your application, by simply writing in the code.
Demo:
https://attour4.easy.minion.cz/hraci/4740-jiri-vanecek
PhotoSwipe support has been added to the Tennis Tournaments app == display player photos via Lightbox popup and Slideshow gallery.
plg_system_wtjsphotoswipe-1.1.5.zip
Subscription 6 months
Total amount of downloads 12