jinjie/slickhero

Add hero banners powered by slickjs

Installs: 87

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 1

Type:silverstripe-vendormodule

1.0.1 2020-04-30 07:10 UTC

This package is auto-updated.

Last update: 2024-03-29 04:32:39 UTC


README

Installation

composer require jinjie/slickhero

Add extension to the page where you want to have the hero banners

Page:
  extensions:
    - SwiftDevLabs\SlickHero\Extensions\SlickHeroBannerExtension

or

class MyObject extends Page {
    private static $extensions = [
        SwiftDevLabs\SlickHero\Extensions\SlickHeroBannerExtension::class,
    ];
}

SilverStripe Elemental

If you are using Elemental, you can use the elemental version instead.

Slick Options

Slick have many options. So I did not implement all the options. I welome you to implement them!

For now, you can set the options by overriding getSlickOptions(). Do make sure to json_encode!

See available options at https://kenwheeler.github.io/slick/

public function getSlickOptions()
{
    return json_encode([
        'dots' => true,
    ]);
}