2017 © Pedro Peláez
 

magento2-module owlcarousel2

image

msp/owlcarousel2

  • Wednesday, March 28, 2018
  • by magespecialist
  • Repository
  • 9 Watchers
  • 12 Stars
  • 7,745 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 8 Versions
  • 11 % Grown

The README.md

Magento 2 OwlCarousel2 module

PHP version, (*1)

This module lets you use OwlCarousel2 with Magento 2 through requirejs., (*2)

Installation

composer require msp/owlcarousel2
bin/magento setup:upgrade

Usage

Initialization

You can init the slider with data-mage-init:, (*3)

<div id="your-slider" class="owl-carousel" data-mage-init='{
    "OwlCarousel": {
      "autoPlay"          :   true,
      "autoplayTimeout"   :   1500,
      "loop"              :   true,
      "items"             :   1,
      "dots"              :   false
    }
}'>
    <img src="kitten1.jpg" />
    <img src="kitten2.jpg" />
    <img src="kitten3.jpg" />
    <img src="kitten4.jpg" />
</div>

or with a <script type="text/x-magento-init">:, (*4)

<div id="your-slider" class="owl-carousel">
    <img src="kitten1.jpg" />
    <img src="kitten2.jpg" />
    <img src="kitten3.jpg" />
    <img src="kitten4.jpg" />
</div>
<script type="text/x-magento-init">
     {
         "#your-slider": {
             "OwlCarousel": {
                "autoplay"        : true,
                "autoPlayTimeout" : 1500,
                "loop"            : true,
                "items"           : 1,
                "dots"            : false
             }
         }
     }
 </script>

OwlCarousel theme css

This module loads only the base css from OwlCarousel, but no theme. The default theme is included, and you can add it to your theme layout default.xml (or whatever layout file) with:, (*5)

...
    <head>
        ...
        <css src="Msp_OwlCarousel2::css/owl.theme.default.min.css" />
        ...
    </head>
...

The Versions

28/03 2018

dev-master

9999999-dev

  Sources   Download

OSL 3.0 OSL-3.0

The Requires

 

28/03 2018

0.1.6

0.1.6.0

  Sources   Download

OSL-3.0

The Requires

 

11/08 2017

0.1.5

0.1.5.0

  Sources   Download

OSL 3.0

The Requires

 

07/08 2017

0.1.4

0.1.4.0

  Sources   Download

OSL 3.0

The Requires

 

26/07 2017

0.1.3

0.1.3.0

  Sources   Download

OSL 3.0

The Requires

 

19/07 2017

0.1.2

0.1.2.0

  Sources   Download

OSL 3.0

The Requires

 

16/02 2017

0.1.1

0.1.1.0

  Sources   Download

OSL 3.0

The Requires

 

22/07 2016

0.1.0

0.1.0.0

  Sources   Download

OSL 3.0

The Requires