phegman / October-CMS-Slick-Slider

Easily create responsive slideshows from the backend and insert them as a component. Supports multiple rows, multiple images per slide, and responsive breakpoints. Built using Ken Wheeler's Slick Slider (http://kenwheeler.github.io/slick/)
MIT License
14 stars 8 forks source link

Problem with responsive breakpointJson #12

Open warmjaijai opened 6 years ago

warmjaijai commented 6 years ago

I configure everything but when I put it into my partial and load the frontend, it does not show the slideshow with error

Uncaught SyntaxError: Unexpected token }

When I expand the component's code it seems that the part

......
......
    zIndex: {{slider.slides.slideShows.z_index ?: 1000}},
    responsive: {{slider.slides.breakpointJson|raw}}
};
......
......

where the variable slider.slides.breakpointJson|raw has not value and empty. Please let me know where gone wrong, thanks

feber commented 6 years ago

I faced a same problem. I made it work, but I do not know why. First, I remove responsive: {{slider.slides.breakpointJson|raw}}, save and load the page. Work as expected. Then, I put the code again, save and load the page. No error were thrown somehow. Does not seem reasonable though.

syl-viadcc commented 6 years ago

Here the same, however, removing the line and adding it again didn't work. On one page (main) where I have two sliders it works OK. Than on the other pages, where the slider makes part of the footer, it is not shown. Any suggestions?

EDIT: The [slider] tag must be in the head of the page, but it only works in the Layouts pages. Initially I placed the [slider] tag in the head of a 'partials' page and it did not work.