silverstripe-carousel 

silverstripe-carousel

This module is also available on github.

It implements a new page type (CarouselPage) that provides everything needed to manage a carousel of images.

You can do bulk uploads and reorder the images by dragging and dropping their thumbnails in a dedicated tab (Image list) inside the CMS. The same image can be shared among multiple carousels. This module adds also some field to the Settings tab. This will allow to customize some aspect of the carousel on a per page basis, such as width and height of the images and a flag to show or hide their captions.

Usage

The ContentCarousel.ss template renders a self-contained <div> with a Bootstrap carousel inside. You can include it in any place inside your pages, e.g.:

<%-- This is a typical Page.ss --%>
<h1>$Title</h1>
<div class="carousel">
    <% include ContentCarousel.ss %>
</div>
<%--
    The following chunk of javascript enables the carousel rotation:
    see the Bootstrap docs for the available options.
    You can (and should) put it in your external javascript file.
--%>
<script>
$(document).ready(function() {
    $('#ss-carousel').carousel();
});
</script>
<div class="content">
    $Content
</div>

Alternatively, the CarouselPage.ss layout template is provided. It renders a full (standard) page, though it works out of the box only with the silverstrap theme because it relies on some convention adopted by that theme.

Author

This project has been developed by ntd. Its home page is shared by other SilverStripe modules and themes.

To check out the code, report issues or propose enhancements, go to the dedicated tracker. Alternatively, you can do the same things by leveraging the official github repository.

Installation

The feature of reordering with drag and drop is provided by the sortablefile module that must be installed before.

To install silverstripe-carousel itself you should proceed as usual: drop the directory tree in your SilverStripe root and do a /dev/build/. You will gain the new CarouselPage type in the CMS.

If you use composer, the dependencies will be pulled-in automatically, so you could just run the following command:

composer require entidi/silverstripe-carousel dev-master

Development Team
Admins
Nicola Fontana

Powered by InDefero,
a CĂ©ondo Ltd initiative.