# Installation
Clone the repository into `~/public_html/plugins/Slider/`:

```bash
git clone https://YOUR_BITBUCKET_ACCOUNT@bitbucket.org/mtcmedia/core-plugins-slider.git ~/MY_FORK/plugins/Slider/ && rm -rf ~/MY_FORK/plugins/Slider/.git
```

# Usage
Include the template file where you want to output the slider in your project.

```bash
{% include('sliders/slider.twig') %}
```

# Edit the Template
Should you wish to tailor the template make a copy of the slider/slider.twig file and place it in the root of your sites/YOUR_SITE/templates folder... it will then override the plugin version of the template.

# Add code to controller

```php
if (!empty($p->pagedata['Slideshow'])) {
    $twig->addGlobal('slideshow', $p->pagedata['Slideshow']);
}
```

# Add code to script.js #

Insert this call to the provided function.  If you need something more custom add this function into your sites folder and tailor.

```js
    /*
     * Slider Plugin
     */
    if ($('.sliderWrap').length) {
        slideShow();
    }
```
