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.
G'day,
I'd like to replace the pager dots with text (preferably text from alt or title tag from corresponding slideshow image).
I know that we can add a custom pager to slick slider. Here's an example I found: http://jsfiddle.net/simeydotme/9nm4ctv9/
How do I manage this when using the slick carousel module, how can I override the settings, use customPaging and update slick?
Can someone advise or point me in the right direction please? Could be a common use case though.
Thanks in advance!
Sev
Comment | File | Size | Author |
---|---|---|---|
#4 | thumbnail-caption-or-any-text-as-navigation.png | 58.03 KB | gausarts |
Comments
Comment #2
gausarts CreditAttribution: gausarts commentedThe sample is similar to this:
#2663852: Multi-rows thumbnail navigation?
For custom works, you can simply override the slick.load.min.js to yours.
Comment #3
gausarts CreditAttribution: gausarts commentedThere is also an option named "Thumbnail caption" for text only pager like tabs if you provide "Optionset thumbnail" to have asNavFor with text navigation. Do not supply "Thumbnail style" to not display thumbnail images.
No need for customPaging.
You can use any available/supplied text as thumbnail caption if using Slick Views, Media or Field Collection, or just Alt and Title if using core image.
Comment #4
gausarts CreditAttribution: gausarts commentedAttached is sample of any text as navigation mentioned above.
Comment #5
VISIOS CreditAttribution: VISIOS commentedGaus,
thank you very much. I will try your proposed approach. Thanks for your ongoing excellent support!
Sev
Comment #6
gausarts CreditAttribution: gausarts commentedMy pleasure ;) Feel free to share your findings, or if any trouble.
Comment #8
DartDev CreditAttribution: DartDev commentedI have to say - it is still not clear how to use customPaging in this module to print custom paging with images programmatically.
I've stumbled upon the same example like op did: https://jsfiddle.net/simeydotme/9nm4ctv9/ and I am not sure how are we supposed to utilize such JS function within PHP environment.
Comment #9
DartDev CreditAttribution: DartDev commentedComment #10
gausarts CreditAttribution: gausarts commentedIt is in both stable and DEV versions via Slick fields UI.
For easy pick, please use DEV one.
The needed:
Please see all the links and screenshots above.
If you want it "programmatically", I am afraid I can't reply it properly unless you mention specific problems with it.
But below are a few hints.
There are just few things to satisfy to achieve the dots pager as thumbnails, assumed DEV version:
theme_slick_image()
slick-dots--thumbnail slick-dots--thumbnail-grid
, seetemplate_preprocess_slick()
injected via dotsClass option. If using a special optionset, then simply put them there, no further codes needed,The stable version is out of scope for this purpose, but possible as seen here: #2663852: Multi-rows thumbnail navigation?.
The good news are:
The JS is already supporting the thumbnail images out of the box at any version as long as you supply [data-thumb] within any element of individual slide. No further JS work needed, except a few CSS to match designs.
You can always find the samples from Slick fields.
Please let me know how it goes.
Comment #11
gausarts CreditAttribution: gausarts commentedFeedback provided. Feel free to re-open if still an issue, or share your findings. Thanks.
Comment #13
gausarts CreditAttribution: gausarts commented