0

To achieve a slider with 5 slides in sight and sliding 1 at a time, I thought https://www.drupal.org/project/views_slideshow_jcarousel would be a good choice. Also, because I already use views_slideshow. However the installation instructions are a bit confusing. They seem to relate to Drupal 7 and/or combined with Drupal 8.

At first I installed through Composer and activated the module in Drupals' User Interface. This did not work. Then I downloaded the zip and tried to place files in different locations. Because it is not clear to me where I should place files, this also failed.

Anybody knows how I could get this to work?

Update: as was noticed by Stefan, the dist folder should be in an other location than the docs (sites/all/libraries/jcarousel/dist) indicate. I moved the contents of the dist folder to that new location (/libraries/jcarousel/lib), this didn't make it work yet. I can see the carousel options in the view that I made, but it doesn't function yet.

I'm setting the view > slideshow settings > widgets > pager type to jcarousel pager. At that point there's a select list for skin without options to choose from. The output of the slider is an unformatted list with the slider below that. Perhaps I'm still doing something wrong?

2

1 Answer 1

2

From looking at the code you need to put the jcarousel library here:

/libraries/jcarousel/lib/jquery.jcarousel.min.js

This means install the module as usual and then put the library like given above in the folder libraries

But it seems that there is truly a flaw in setup instructions: The module page states like this:

Download and extract the jCarousel library to libraries folder of drupal root. The source code can be found here:

https://github.com/jsor/jcarousel/releases

the folder name you create for this will need to be "jcarousel". the full path should be: libraries/jcarousel

and when you are done, the following path will need to be available: sites/all/libraries/jcarousel/dist

This is a mixup of D7 and D8 as TO already stated and in addition if you do it like so, the path given in views_slideshow_jcarousel.libraries.yml will not be available.

I created an issue to maybe get this fixed: https://www.drupal.org/project/views_slideshow_jcarousel/issues/3084864

9
  • Stefan, thanks for your confirmation of the file structure flaw and the issue you created. I moved the dist folder to the new location, this didn't make it work yet. See update in the question
    – C.A. Vuyk
    Oct 1, 2019 at 10:24
  • If you use the current version of the module you need to put it to: /libraries/jcarousel/lib - only if you use my patch from the issue than /libraries/jcarousel/dist would be the path. Oct 1, 2019 at 10:40
  • Do you mean I have to move the contents of the dist folder to /libraries/jcarousel/lib or to /libraries/jcarousel/lib/dist?
    – C.A. Vuyk
    Oct 1, 2019 at 11:01
  • Yes, move the contents of the dist to lib folder or just rename dist folder to lib. But be aware that is actually not correct and the path might be changed to dist again later if the patch from the issue will be accepted. But with current version it needs to be placed in lib folder. Oct 1, 2019 at 12:05
  • Perhaps I'm still doing something wrong, this doesn't change things. I edited the question a bit Stefan.
    – C.A. Vuyk
    Oct 1, 2019 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.