Skip to main content

Lightbox Feature

In the professional version of the module you can activate a lightbox for different file types. Using the lightbox your visitors can get a "preview" of the document before they actually download it. An optional download is possible within the lightbox. In the module settings you can define if a download via link should be possible or not. In addition, you can make various settings to style the download (button):

Lightbox 3 vid

The image above shows a video file (mp4) that can be played in the modal, below it is the optional "Download" button.

This function was tested with the following file types:

Image files: jpg,jpeg,png,gif
Video files: mp4
Other documents: pdf,html,htm,txt,rtf,xml

Configuration options:

In the backend there are various options available with which you can easily define which file types should be displayed within a lightbox:

LightboxConfig

Each file of the listed file types will be displayed inside a lightbox in the frontend when clicked, all other document types will lead to a "Download prompt".

Adjust iFrame Background

If you want to display documents of type xml, txt or html inside the lightbox you may need to add a CSS rule in your template if you are working with a Uikit template. By default, Uikit does not define a background color for the iFrames in a lightbox. So to make the content readable (and not have black text on a black background) you have to add the following CSS rule to your template:

iframe.uk-lightbox-iframe{
background:#fff;
border-radius:4px;
}

The border radius is optional, but looks nice...

Lightbox 6 xml