silverstripe-gallery 

silverstripe-gallery Git Source Tree

Root/README.md

1Silverstripe Gallery
2====================
3
4A new page type (_GalleryPage_) that provides everything needed to
5manage a photo gallery.
6
7You can do bulk uploads and reorder the images by dragging and dropping
8their thumbnails in a dedicated tab (_Gallery_) inside the CMS. The same
9image can be shared among multiple galleries. This module adds also some
10field to the _Settings_ tab. This will allow to customize some aspect of
11the gallery on a per page basis, e.g. the height of the thumbnail strip,
12the height of the image slide and a flag to show or hide the captions.
13
14Usage
15-----
16
17You can write your own templates and support the JavaScript library of
18your choice. Out of the box the [Fotorama](http://fotorama.io/) library
19is used. You can embed the default gallery block in your pages by
20including `ContentGallery.ss`, e.g.:
21
22 <%-- This is a typical Page.ss --%>
23 <h1>$Title</h1>
24 <div class="gallery">
25 <% include ContentGallery.ss %>
26 </div>
27 <div class="content">
28 $Content
29 </div>
30
31Keep in mind the default templates only use the `Height` and
32`ThumbnailHeight` settings: they *must* be set to a value greater than 0
33or an error will be generated. By default they should be set by the CMS
34to 400 and 64 respectively.
35
36Alternatively, the `GalleryPage.ss` layout template is provided. It
37renders a full (standard) page, though it works out of the box only with
38[silverstrap](http://dev.entidi.com/p/silverstrap/) because it relies on
39some convention adopted by that theme.
40
41Author
42------
43
44Although the project originally started as a fork of
45[silverstripe-gallery](https://github.com/i-lateral/silverstripe-gallery)
46by [i-lateral](http://www.i-lateral.com/), the actual code has been
47rewrote almost from scratch by [ntd](mailto:ntd@entidi.it) and, apart
48the name, practically everything else has changed.
49
50The project [home page](http://silverstripe.entidi.com/) is shared by
51other [SilverStripe](http://www.silverstripe.org/) modules and themes.
52
53To check out the code, report issues or propose enhancements, go to the
54[dedicated tracker](http://dev.entidi.com/p/silverstripe-gallery).
55Alternatively, you can do the same things by leveraging the official
56[github repository](https://github.com/ntd/silverstripe-gallery).
57
58Installation
59------------
60
61The gallery module is implemented as an extension of
62[silverstripe-carousel](https://github.com/ntd/silverstripe-carousel),
63so you *must* install it first. This in turn will install the
64[sortablefile](https://github.com/bummzack/sortablefile) module that
65provides the drag and drop reordering feature.
66
67To install silverstripe-gallery itself you should proceed as usual:
68drop the directory tree in your SilverStripe root and do a
69`/dev/build/`. You will gain the new `GalleryPage` type in the CMS.
70
71If you use [composer](https://getcomposer.org/), the dependencies will
72be pulled-in automatically, so you could just run the following command:
73
74 composer require entidi/silverstripe-gallery dev-master

Archive Download this file