Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The jCarousel library supports the addition of what it calls "pagination". These are the little numbers or dots that appear below a carousel to allow a user to jump to a specific page in the carousel.
The jCarousel module does not seem to have support for this (despite a misleading description of what the "navigation" option does).
Let's add it. Patch forthcoming.
Comment | File | Size | Author |
---|---|---|---|
#7 | interdiff_5-7.txt | 2.08 KB | Rishi Kulshreshtha |
#7 | jcarousel_add-pagination_2882564-7.patch | 6.81 KB | Rishi Kulshreshtha |
#7 | After.png | 34.31 KB | Rishi Kulshreshtha |
#6 | Before.png | 34.1 KB | Rishi Kulshreshtha |
#5 | jcarousel_add-pagination_2882564-5.patch | 4 KB | skylord |
Comments
Comment #2
azinck CreditAttribution: azinck commentedHere's a first stab.
I'm guessing it won't work too well if you're using the jcarousel views pager plugin or ajax. I don't really know much about those use-cases, but I doubt getting this functionality to work with ajax is an easily solvable problem within the jCarousel framework.
Comment #3
niko- CreditAttribution: niko- as a volunteer commentedHi @azinck
Sorry for delay with unswer
I think that adding support of "pagination" is great idea
Only one thing is blocker to apply this patch in module.
We should prevent adding html in js and use twig templates instead
Comment #4
niko- CreditAttribution: niko- as a volunteer commentedComment #5
skylord CreditAttribution: skylord commentedReroll for version 6 and remove adding html in js as plugin defaults are working well.
Comment #6
Rishi KulshreshthaThanks @skylord; the rerolled patch looks good, but the pagination numbers are vanilla. IMHO we can have a similar approach of using skins here to fix this.
Comment #7
Rishi KulshreshthaAdded pagination styling.
Comment #8
firstlut CreditAttribution: firstlut commentedThanks for doing this! It works a charm. I did have to add a "display: flex" to the
<p>
that contains the pagination dots, as they were stacking up. I've also set up a view with 4 images across, and it's treating every 4 images as one page, instead of creating a dot for each image.If I knew more JS, I'd figure it out myself, but I'm the worst!