10 years ago
1
Topic

Hi, using Joomla and Seblod, I would like to create a gallery of thumbnails only, tiled next to one another, such that when clicking on a thumbnail, the corresponding image will open into a pop-up window (or equivalent) and display larger image and description.

Get a VIP membership
97 Posts
Anjo
10 years ago
0
Level 1

Hi StephanS,

For a gallery you need to create 2 fields (Upload Image and Field X) Field x needs to call the field name given to the Upload image.

This is how I create my galleries:

  1. Create a images folder under joomla root (images/seblod_gallery)
  2. In Seblod construction Apps Folder – create a folder called “Gallery” to store gallery fields
  3. Seblod construction click Fields then filter to the new gallery folder you just created
  4. Click New to add a field – choose type “Upload Image” field name=Gallery
  5. Under Folder * box type images/seblod_folder - the folder where images will be stored
  6. Input Width / Height dimensions for thumbnails (example 150x150)
  7. Save field – standard – article – gallery
  8. Create a new field – Type – Field X
  9. Name it - Gallery Field x
  10. Under Field * box type – gallery – or the name of the previous field
  11. Under maximum, type the maximum number of images that can be uploaded to the gallery
  12. Save storage as – custom – article – introtext

Your gallery fields are now ready

Insert both fields in forms & content types (Gallery & Gallery Field X)

Hide the gallery upload image Field – Label variation Hidden

When you create an article the field x gives you the option to upload individual images for the gallery

To create a gap between the images on the front end add css

.gallery-gap img {margin: 5px;}

To make gallery responsive create a js file and call it in the template

Or add this code in the template

<script type="text/javascript">

// Make ColorBox responsive

jQuery.colorbox.settings.maxWidth = '95%';

jQuery.colorbox.settings.maxHeight = '95%';

// ColorBox resize function

var resizeTimer;

function resizeColorBox()

{

if (resizeTimer) clearTimeout(resizeTimer);

resizeTimer = setTimeout(function() {

if (jQuery('#cboxOverlay').is(':visible')) {

jQuery.colorbox.load(true);

}

}, 300);

}

// Resize ColorBox when resizing window or changing mobile device orientation

jQuery(window).resize(resizeColorBox);

window.addEventListener("orientationchange", resizeColorBox, false);

</script>

Hope this helps

Anjo

Get a Book for SEBLOD