Creating an image gallery

by Gisle Hannemyr

This page is a placeholder.

Table of contents

Introduction

[TBA]

Colorbox

The project Colorbox is a Drupal bridge module for colorbox jQuery library by Jack Moore. The page links to some nice demos. These are included in the library in the directories example1-5.

The module is not able to use composer to install the library, see DO isuue: Discover colorbox library when installed with composer for details.

First install the Libraries module. Then use drush to download and install the library and place it in the directory /web/libraries below your site's webroot.

$ composer require 'drupal/libraries:^3.0@beta'
$ drush colorbox-plugin

Install the colorbox bridge module:

$ composer require 'drupal/colorbox:^1.8'

To install the library, do the following:

  1. Download colorbox-master.zip from the library home page.
  2. Copy colorbox-master.zip into this directory.
  3. Unzip the file.
  4. Rename the library directory from colorbox-master to colorbox.
  5. Check the site's Status report to see that the colorbox library is installed.

Tutorial: OSTraining.

Step #1: Create a content type and content

Start out by creating a content-type "Gallery" which has a field "image" with an unlimited number of images.

Create a Image field that is attached to your new content type. Also, because this is just going to be a gallery, I removed the Body field from this content type.

Step #4:

The name you give the view is reproduced in the CSS.

Juicebox

First install the Libraries module. Then use drush to download and install the library. the directory /web/libraries below your site's webroot (unless this has been done before).

$ composer require 'drupal/libraries:^3.0@beta'
$ cd web
$ mkdir libraries
$ composer require 'drupal/libraries:^3.0@beta'

Final word

[TBA]

createaccount.png
Figure x-x: .

Last update: 2022-02-18.