1

I need some advice on how to implement an OWL carousel with Joomla! native custom module. I have done some research already and I have tried several options including the add of the owl files to the media/jui folder, but for now the result is null.

The html part is a simple code


1

 $('.owl-carousel').owlCarousel({
    loop:true,
    margin:10,
    nav:true,
    responsive:{
        0:{
            items:1
        },
        600:{
            items:3
        },
        1000:{
            items:5
        }
    }
})
1
  • 1
    Hi Djamel, welcome to JSE! Please if you could share/include some code you already used and failed, you can insert code parts by editing your question and we can see better what the real problem is with including that carousel in your module. Does the module work without the carousel?
    – Zollie
    Commented May 5, 2021 at 12:44

1 Answer 1

2

What do you exactly mean with "Joomla! native custom module"? Joomla's Custom HTML module?

The OWL carousel I found on github uses some JavaScript(JS) + CSS, and some HTML tags with classes that you could put in your Joomla custom HTML module:

<div class="owl-carousel owl-theme">
  <div> Your Content </div>
  <div> Your Content </div>
</div>

The JS + CSS have to be loaded on the pages where you display the Joomla Custom Module. To load JS or CSS, you could use Joomla's

For instance, you could load the JS + CSS via your front-end template. However it will be loaded on all other pages as well and might have a (small) negative impact on the performance of your website.

1
  • Hello Peter, thank you for the guideline, I will go through the doc
    – webdjam
    Commented May 8, 2021 at 14:58

Your Answer

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

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