[thelist] Ideas for creating image galleries

Randal Rust randalrust at gmail.com
Fri Nov 10 07:03:37 CST 2006

I have a custom-built CMS that I need to add an Image Gallery module
to. I already have an Images module, which allows users to upload

Sounds simple enough, but not really.

Creating galleries, adding images and ordering the images is easy
enough. The trick is that these galleries have to be categorized and
need to be attached to different kinds of records...


...that are stored in different tables.

So, my first issues is how to create the galleries. Should they all be
created in one place? If I do this, then I would have a menu item
called Image Galleries. Each gallery would be assigned a name,
description and category (project, general, development, etc.) when it
is created. This seems logical, until I start to think about the
usability of the thing. This process would require creating the Image
Galleries in one place, and then going to the individual records under
Projects (or whatever) and then picking the gallery from a list and
assigning it to the record.

The second issue is how to map the image galleries to multiple kinds
of parent records. My current thinking is to have three tables:


The image_gallery_mapping table has the following columns:

id -- unique id of the record
parentRecordID -- id of the record in the parent table (project,
development, etc.)
parentRecordType -- category of the parent record (PROJ, DEV) so I
know what table it comes from
galleryID -- id of the image gallery (foreign key basically)
orgID -- id of the organization that the gallery is assigned to

Any thoughts for improvement in usability or technical aspects while I
work on this would be greatly appreciated. I'm sure I'm not the first
to go down this path:)

Randal Rust
R.Squared Communications

More information about the thelist mailing list