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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

visios created an issue. See original summary.

gausarts’s picture

The sample is similar to this:
#2663852: Multi-rows thumbnail navigation?

For custom works, you can simply override the slick.load.min.js to yours.

gausarts’s picture

There 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.

gausarts’s picture

Status: Active » Fixed
FileSize
58.03 KB

Attached is sample of any text as navigation mentioned above.

VISIOS’s picture

Gaus,

thank you very much. I will try your proposed approach. Thanks for your ongoing excellent support!

Sev

gausarts’s picture

My pleasure ;) Feel free to share your findings, or if any trouble.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

DartDev’s picture

I 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.

DartDev’s picture

Status: Closed (fixed) » Active
gausarts’s picture

It is in both stable and DEV versions via Slick fields UI.

For easy pick, please use DEV one.
The needed:

  • An optionset with dots option enabled
  • A thumbnail image style
  • A thumbnail effect: Grid.

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:

  • A [data-thumb] attributes referencing a thumbnail URL (not URI) at the media or image element, see relevant theme function theme_slick_image()
  • Two special classes slick-dots--thumbnail slick-dots--thumbnail-grid, see template_preprocess_slick() injected via dotsClass option. If using a special optionset, then simply put them there, no further codes needed,
  • And of course the proper CSS, see /slick/css/components/slick.thumbnail--grid.css.

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.

gausarts’s picture

Status: Active » Fixed

Feedback provided. Feel free to re-open if still an issue, or share your findings. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

gausarts’s picture

Issue tags: +slick tabs