heimrichhannot / contao-slick-bundle

A content slider/carousel for contao based on kenwheelers slick carousel.
3 stars 3 forks source link

Slick Slider with thumbnails #63

Closed pixelmatty closed 1 year ago

pixelmatty commented 2 years ago

Dear community

I use latest Contao 4.9 with latest Slick Bundle. Has anyone already used it with thumbnails and built a template for this? Means one image and below (or beside) the thumbnails of all pictures of the slider? There is an examples at stackoverflow but I'm not able to transform this for use with the Contao Slick extension. I suppose a template and some formatting css for thumbnail selectors are the way? What do I have to change in contao or to add in template ...?

https://stackoverflow.com/questions/39567327/how-to-create-thumbnail-carousel-with-image-previews-in-slick-js

I would appreciate some help. Thanks Pixelmatty

koertho commented 2 years ago

You could create a complete custom template and add the code there, no need for the bundle itself (just for the scripts).

pixelmatty commented 2 years ago

Ok, thanks, but this is my problem and why I asked for an existing template. Sorry, but I don't know how the template and the additional code has to look like. I don't understand enough from coding. I'm a Designer and want to use it for my privat website.

koertho commented 2 years ago

Sorry, I can't teach you the basics here. Have a look at the documentation: https://docs.contao.org/dev/framework/templates/

Then you can create a custom template for e.g. the ce_html element (in 4.13 you also have a simple template element). You also need to load the assets in there, as slick bundle loads them only when needed:


<?php 
$GLOBALS['TL_USER_CSS']['slick']                 = 'assets/slick/slick/slick.css|static';
$GLOBALS['TL_JAVASCRIPT']['slick']               = 'assets/slick/slick/slick.min.js|static';`
?>
pixelmatty commented 2 years ago

OK thanks so far. I'll try to check it out. But nevertheless I wonder why no one has already used it. Or are not so many users in here?

koertho commented 1 year ago

I close this since this is not direct issue with this bundle.