Extension Gallery View


Extension Basics

Title
Gallery View
Name
ckanext-gallery
Type
Public extension
Description
A CKAN extension for a dataset gallery view. Provides gallery display functionality for resources with image support including IIIF.
CKAN versions
Download-Url (zip)
Last commit
2 months ago (2026-01-05 17:28:01)
Url to repo
Category
Visualization & Analytics


Background Infos

Description (long)
Show details

ckanext-gallery

A CKAN extension for a dataset gallery view.

Overview

Adds a gallery view for resources on a CKAN instance. Three plugins are included in this extension: the main plugin (gallery) and two view plugins for specific image/data types (gallery_image and gallery_iiif).

Based on blueimp Gallery.

Installation

Installing from PyPI

pip install ckanext-gallery

Installing from source

  1. Clone the repository into the src folder:

    cd $INSTALL_FOLDER/src
    git clone https://github.com/NaturalHistoryMuseum/ckanext-gallery.git
    
  2. Activate the virtual env:

    . $INSTALL_FOLDER/bin/activate
    
  3. Install via pip:

    pip install $INSTALL_FOLDER/src/ckanext-gallery
    

Post-install setup

  1. Add ‘gallery’ to the list of plugins in your config:

    ckan.plugins = ... gallery
    
  2. Install lessc globally:

    npm install -g "less@~4.1"
    

Configuration

Option Description Default
ckanext.gallery.records_per_page Number of images to display on a page 32
ckanext.gallery.image.resource_types Space-separated list of resource formats for basic image field type csv tsv
ckanext.gallery.iiif.resource_types Space-separated list of resource formats for IIIF image field type csv tsv

Usage

To use as a view, no further setup is needed; the ‘Gallery’ type should be available for resources after installing the plugin.

Interfaces

The IGalleryImage interface allows plugins to override settings.

Templates

{% snippet 'gallery/snippets/gallery.html', images=g.images, resource_id=res.id %}

Testing

There is a Docker compose configuration available in this repository to make it easier to run tests.

Version
3.0.6
Version release date
2026-01-05
Contact name
Natural History Museum
Contakt email
(not set)
Contact Url


Installation Guide

Configuration hints

Requires lessc (npm install -g less@~4.1). Based on blueimp Gallery. Supports IIIF images.

Plugins to configure (ckan.ini)
gallery gallery_image gallery_iiif
CKAN Settings (ckan.ini)
# ckanext.gallery.records_per_page = 32
# ckanext.gallery.image.resource_types = csv tsv
# ckanext.gallery.iiif.resource_types = csv tsv
DB migration to be executed
(not set)
<< back to Extensions