Customizing

In this tutorial we will see how to create your own cusom templates to customize the apparence of the gallery and modify a bit some details.  you will need fort this a bit knowledge of PHP, HTML and CSS.

1 - Create a copy of the custom template.

First of all we wil create a custom templates that will be attached to your website, not the addon. Like this you will upgrade the addon how many times you want without loosing your edit. TO do that :

  1. Create a folder named 'blocks' into root/application/
  2. Create a folder named 'easy_image_gallery' into this folder like : root/application/blocks/easy_image_gallery
  3. Create a folder named templates into this last folder
  4. Finaly, create the last folder named as you want into the templates folder like : root/application/blocks/easy_image_gallery/templates/my_custom_template
  5. In this step you need to choose your starting point : If you want to start your customization from the default template you will need to paste the view.php and view.css from the root folder of the easy image gallery addon (like root/packages/easy_image_gallery/blocks/easy_image_gallery/view.php)
    If you want to start from the masonry template, you will need to paste the view.php and view.css from the template/masonry folder of the easy image gallery addon (like root/packages/easy_image_gallery/blocks/easy_image_gallery/templates/masonry/view.php)
  6. Into this my_custom_template folder paste the view.php and view.css file from the point below
  7. Make change into these files

In view.php

The code seems to be complicated but it's relativly simple and like any other gallery addon. Here some details on variable available

$options->galleryColumns : The number of columns choosed in the advanced options

$thumbnailUrl : The url of the Thumbnail

$fullUrl : The url of the full width image

$ratio : if the image are vertical or horizontal or square

 

Here a very simple starting point to your own gallery template to play with. It contains only basic variables needed to start a good gallery : https://github.com/myconcretelab/easy-gallery_templates/blob/master/basic.php

 

Good Luck !