PM Carousel
The PM-Carousel module provides a custom field formatter to display entity reference fields as carousels using PM-Carousel JS library.
PM-Carousel, for "Pimp My Carousel" is a pretty small, accessible and vanilla JavaScript to manage your carousels. It has no dependencies!
- PM-Carousel JS library documentation can be found here : https://github.com/lordfpx/pm-carousel
- PM-Carousel JS library showcase can be found here : https://lordfpx.github.io/pm-carousel
Table of contents
Requirements
This module requires no additional modules.
Installation
- Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.
- Download PM-Carousel JS library pm-carousel library
- Copy
pm-carousel.umd.js
file in the/libraries/pm-carousel/dist/
folder of your site
Configuration
- Enable the module at Administration > Extend.
- Navigate to the "Manage Display" tab of the desired entity reference field.
- Select
PM Carousel container
as the formatter for the field. - Configure the formatter settings
- Save and view your content to see the carousel in action.
YAML configuration example
default:
loop: false
group: 1
spaceAround: 0
noStartSpace: true
autoplay: 0
responsive:
- { minWidth: 1024px, disable: false }
- { minWidth: '0', disable: true }