PHPackages                             zirak/simple-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. zirak/simple-gallery

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

zirak/simple-gallery
====================

A simple photogallery management module

4.0.0(8y ago)1562[1 PRs](https://github.com/g4b0/silverstripe-simple-gallery/pulls)GPL-2.0-onlyPHP

Since Jul 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/g4b0/silverstripe-simple-gallery)[ Packagist](https://packagist.org/packages/zirak/simple-gallery)[ RSS](/packages/zirak-simple-gallery/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (10)Used By (0)

Simple Gallery
==============

[](#simple-gallery)

A simple photogallery management module.

Introduction
------------

[](#introduction)

With this module you will be able to extend each DataObjects, including Pages, in order associate to it a photogallery. If a Page needs more than a single photogallery, than it's possible to create a Gallery Dataobject, extend it with SimpleGallery, than assign it in a has\_many relationship to the page. See example below.

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

[](#requirements)

- SilverStripe ^4.0 (version master/4+)
- SilverStripe ^3.1 (version 1.+ / 3.+)
- colymba/gridfield-bulk-editing-tools ^3.0.\* (version master/4+)
- colymba/gridfield-bulk-editing-tools ^2.1.\* (version 1.+ / 3.+)
- undefinedoffset/sortablegridfield ^2.0.\* (version master/4+)
- undefinedoffset/sortablegridfield ^0.\* (version 1.+ / 3.+)

Installation
------------

[](#installation)

Install the module through [composer](http://getcomposer.org):

```
composer require g4b0/simple-gallery
composer update

```

### Single gallery

[](#single-gallery)

To have a single gallery per page extend the desired page type through the following yaml:

```
Page:
  extensions:
    - g4b0\SimpleGallery\SimpleGalleryExtension
```

#### Template

[](#template)

A really basic template is given, to use it just put this code into your Page template:

```

```

For a nice visualization into the default SS template add this CSS code:

```
.simplegallery img {width: 30%; float: left; margin: 10px;}
```

You have to write your own .ss files for more advanced features. Just overwrite template/simplegallery.ss into your theme and loop over $SortedImages writing your HTML code:

```

	 $Image

	 $Image

```

You can access the following image variable:

$CustomLink $Title $Text $Disabled $SortOrder

### Multiple gallery

[](#multiple-gallery)

If you prefer to have multiple sortable gallery in a specific page type simply add an has\_many relationship like the following example:

```
class Portfolio extends Page {

	private static $has_many = array(
			'Galleries' => 'SimpleGallery'
	);

	public function getCMSFields() {
		$fields = parent::getCMSFields();

		$gridFieldConfig = GridFieldConfig_RelationEditor::create();
		$gridFieldConfig->addComponent(new GridFieldSortableRows('SortOrder'));
		$field = new GridField(
						'Galleries', 'Galleries', $this->SortedGalleries(), $gridFieldConfig
		);
		$fields->addFieldToTab('Root.Galleries', $field);

		return $fields;
	}

	public function SortedGalleries() {
		return $this->Galleries()->sort('SortOrder');
	}

}
```

#### Template

[](#template-1)

Just like simplegallery, a very basic template is given, to use it just put this code into your Page template:

```

```

For a nice visualization into the default SS template add this CSS code:

```
.simplegallery {clear: both;}
.simplegallery img {width: 30%; float: left; margin: 10px;}
```

You have to write your own .ss files for more advanced features. Just overwrite template/simplegalleries.ss into your theme and loop over $SortedGalleries, and then over $SortedImages

```

			$Name
			$Description

				 $Image

				 $Image

```

Config
------

[](#config)

Editing \_config/simplegallery.yml it's possible to modify gallery behaviour:

```
* gallery_name: The gallery name that appear in backend tabs (default: Gallery)

```

- folder\_path: path where the uploaded images are stored (default: simplegallery)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 96% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~168 days

Recently: every ~224 days

Total

9

Last Release

2977d ago

Major Versions

1.4 → 3.02017-12-22

3.0.x-dev → 4.0.02018-03-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/11ee3ded134711b9ff1d704b1d448a7d3fdfe1b5f5b2e2809cda7eeac8356de5?d=identicon)[g4b0](/maintainers/g4b0)

---

Top Contributors

[![g4b0](https://avatars.githubusercontent.com/u/2427390?v=4)](https://github.com/g4b0 "g4b0 (24 commits)")[![ivoba](https://avatars.githubusercontent.com/u/471254?v=4)](https://github.com/ivoba "ivoba (1 commits)")

---

Tags

imagesilverstripephotogalleryphotogallery

### Embed Badge

![Health badge](/badges/zirak-simple-gallery/health.svg)

```
[![Health](https://phpackages.com/badges/zirak-simple-gallery/health.svg)](https://phpackages.com/packages/zirak-simple-gallery)
```

###  Alternatives

[heyday/silverstripe-responsive-images

Configure and send a series of image size options to the client without loading any resources until a media query can be executed.

5387.7k6](/packages/heyday-silverstripe-responsive-images)[frankmullenger/gallery

SilverStripe Gallery Module

243.7k1](/packages/frankmullenger-gallery)[andrewhoule/silverstripe-photogallery

Creates a basic photo gallery pagetype with albums and photos. Photos within albums are opened with a lightbox.

117.0k1](/packages/andrewhoule-silverstripe-photogallery)[chrometoaster/silverstripe-image-quality

Adds Quality function to images

1013.0k1](/packages/chrometoaster-silverstripe-image-quality)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
