PHPackages                             frankmullenger/gallery - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. frankmullenger/gallery

ActiveSilverstripe-module[Image &amp; Media](/categories/media)

frankmullenger/gallery
======================

SilverStripe Gallery Module

1.1.x-dev(11y ago)233.7k17[13 issues](https://github.com/frankmullenger/silverstripe-gallery/issues)[3 PRs](https://github.com/frankmullenger/silverstripe-gallery/pulls)1JavaScript

Since Oct 9Pushed 10y ago9 watchersCompare

[ Source](https://github.com/frankmullenger/silverstripe-gallery)[ Packagist](https://packagist.org/packages/frankmullenger/gallery)[ RSS](/packages/frankmullenger-gallery/feed)WikiDiscussions 1.1 Synced today

READMEChangelogDependencies (2)Versions (3)Used By (1)

Gallery
=======

[](#gallery)

Maintainer Contact
------------------

[](#maintainer-contact)

Frank Mullenger
[Contact Me](http://swipestripe.com/support/contact-us)
[Blog](http://deadlytechnology.com)
[Ecommerce Module](https://swipestripe.com)

Requirements
------------

[](#requirements)

- SilverStripe framework &gt;3.1.2
- SilverStripe cms &gt;3.1.2

Version
-------

[](#version)

1.1

Documentation
-------------

[](#documentation)

Very simple gallery solution to upload images and display them in a basic gallery using Fancybox.

A **gallery can be added to any page type**, GalleryPage is shipped with this module as an example.

Uses customised UploadField to manage the images, allowing bulk upload of images then resorting using drag drop and editing of captions inline.

An example implementation using Fancybox2 has been provided. You are required to [purchase a licence for Fancybox](http://fancyapps.com/fancybox/#license) for commercial websites. Fancybox can be replaced easily for each page type you apply the gallery to.

Installation Instructions
-------------------------

[](#installation-instructions)

### Composer

[](#composer)

1. `composer require frankmullenger/gallery 1.0.*@dev`
2. Visit yoursite.com/dev/build?flush=1 to rebuild the database (you may need to do this twice).

### Manual

[](#manual)

1. Place this directory in the root of your SilverStripe installation, rename the folder 'gallery'.
2. Visit yoursite.com/dev/build?flush=1 to rebuild the database (you may need to do this twice).

Usage
-----

[](#usage)

1. Create "Gallery page" in the CMS
2. Edit the gallery page and go to "Gallery" tab
3. Drag images into the "Drop" area
4. [Edit caption for images](http://i.imgur.com/h8EwN.png)
5. [Drag and drop images to re-order them](http://i.imgur.com/vPrX3.png)

### Extended usage

[](#extended-usage)

You can make any page type a gallery by applying the extensions in this module to a page type. Using GalleryPage as an example:

#### Create a page type

[](#create-a-page-type)

Including Javascript in your controller to display the images in your gallery and a DataObject representing the join table. Because we are applying an extension with a many\_many Images component you will need a DataObject {PageType}\_Images to represent the join. This object requires Caption and SortOrder fields.

```
