Gallery

The Gallery app allows you to publish images or the contents of a PDF on your website, with a minimum of fuzz.

Once the app is configured, it handles both the creation of thumbnails and detail images from all images added to the gallery-folder.

To a visitor, an implementation of the Gallery app could look like Figure 1.1.

In this article, you will learn how to set up and configure a Gallery app on your solution.

Figure 1.1 A gallery in frontend - factory templates

To use the Gallery app, it must be added to a paragraph on a page.

You then have access to the app settings (Figure 2.1), from which you can control the behavior of the app - or remove it again.

 

Figure 2.1 The app header

The first thing you need to decide it whether you want to publish images or the contents of a PDF (Figure 3.1).

Figure 3.1 The show settings

Once you make your selection, you can configure the app based on your choice.

If you select image folder, you will be presented with the options in Figure 4.1).

Figure 4.1 The settings when publishing an image folder

With the List settings, you must:

  • Select a folder to publish images from – and a template to present them visually.
  • Select whether you want to sort the images by date or name – and in which order (ascending or descending)
  • Specify a download link label (if your template contains a download link) and an empty folder message

The Quality setting allows you to set a compression quality for images used in the gallery – values between 50% and 100% are accepted, and the default is 90%.

The Thumbnails and Image settings lets you set a max width and height for the thumbnail and the detail image – once the paragraph is saved, the images are automatically generated in your file system in subfolders called GalleryImages and GalleryThumbs.

The Detail setting allows you to select a template for the image detail view – the view which opens when a thumbnail is clicked.

Finally, the paging settings let you control page size, and the label and layout of the back and forward-buttons.

If you select PDF, you will be presented with the options in Figure 5.1.

Figure 5.1 Publishing a PDF as images

You must:

  • Select the PDF you want to publish as images
  • Select a list template to render the image list
  • Set a compression quality for images used in the gallery – values between 50% and 100% are accepted, and the default is 90%
  • Specify a max width and max height for the generated detail images
  • Select a detail template for rendering the detail images

Be aware that large PDF’s will possibly time out during image generation – we recommend a max size of 100 pages, but the limit depends on your server setup. Occasionally, a PDF may use a font which cannot be converted correctly – in which case you must change the font used.

Database

There is no database specific information for this subject.