plakart / contao-swiper-extension
Erweitert den Standard-Contao Swiper um weitere Optionen
Package info
github.com/plakart/contao-swiper-extension
Type:contao-bundle
pkg:composer/plakart/contao-swiper-extension
Requires
- contao/core-bundle: >=5.7
Requires (Dev)
- contao/manager-plugin: ^2.0
Conflicts
- contao/manager-plugin: <2.0 || >=3.0
README
This extension enhances the default Contao Swiper with three additional fields:
- Toggle navigation buttons
- Toggle pagination bullets
- Custom JSON options for the Swiper instance
This avoids the need to create multiple Swiper templates.
The implementation was strongly inspired by fritzmg's extension (https://github.com/fritzmg) "contao-swiper" (https://github.com/fritzmg/contao-swiper).
Custom Options
The Custom options field expects a valid JSON configuration for Swiper.
Its content is merged directly into the initial Swiper options and can therefore override the other fields such as navigation or pagination.
Example configuration for the field Custom options
{
"loop": true,
"spaceBetween": 24,
"navigation": false,
"pagination": {
"el": ".custom-pagination",
"clickable": true
},
"breakpoints": {
"768": {
"slidesPerView": 2
},
"1200": {
"slidesPerView": 4
}
}
}