2

I am trying to install the following slider to my own Module https://owlcarousel2.github.io/OwlCarousel2/demos/demos.html.

But unfortunately, Magento has its own complicated mechanism to manage its static assets like js and css.

My question is, "Is it possible to install 3rd party js extension on Magento 2?" if yes then how to make it work?

asked May 17, 2019 at 6:59
4

1 Answer 1

2

I advise downloading the JS file from the Owl carousel website and including it in your theme. Steps for that can be found here as Prathap linked.

But if you really want to include external JS you can do so via layout XML:

<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 <head>
 <script src="https://www.google.com/recaptcha/api.js" src_type="url"/>
 </head>
</page>
answered May 17, 2019 at 9:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.