Enovision Lightbox is very easy to implement lightbox feature for October CMS.
This plugin requires the Enovision Filters plugin to be installed
This lightbox is in implementation of the Javascript only lightbox of Felix Hagspiel
This plugin is licensed under the MIT license agreements.
This plugin is using code that is adapted from the Wordpress CMS.
The license under which the WordPress software is released is the GPLv2 (or later) from the Free Software Foundation.
Install this plugin
I will explain this based on the use of the Rainlab/Blog plugin.
On the page where you have the single post, you have to add the lightbox to filter (Hooks plugin) the images content.
Now drag the Lightbox plugin onto the page. See image below.
Now enter the following in the code section of this page:
use Illuminate\Support\Facades\App;
function onEnd()
{
$filterService = App::make('Enovision\FilterService');
/* This filter is defined in plugin Lightbox */
$this->post->content_html = $filterService->apply_filters('content_lightbox', $this->post->content_html);
}
The 'content_lightbox' filter is already defined.
![](/storage/app/media/Duesenberg.jpg?lightbox){.img-thumbnail .img-fluid .w-25}
or:
![](/storage/app/media/Duesenberg.jpg?something=nothing&lightbox)
When using html, it is all about the data-jslghtbx
tag:
<a href="/storage/app/media/Duesenberg.jpg" data-toggle="lightbox">
<img src="/storage/app/media/Duesenberg.jpg" class="..." data-jslghtbx />
</a>