Group Images for Lightbox
- lemonmagic
-
Topic Author
- Offline
- Новый участник
-
- Posts: 5
- Thank you received: 0
Is it possible to group images for Lightbox View.
Currently if guests are looking at a category-blog view, within the Lightbox they can switch through all Images which are processed on the Page. Depending on the Content this can be very confusing.
Therefore I would like to set each Image within an Article to the same Group,
something like
<img url="/images/image.jpg" class="mavik-thumbnail" data-group="Article21" width="150" height="300" />Please Log in or Create an account to join the conversation.
But now images have group id. Example for Slimbox:
<a href="/thumbnail/images/sampledata/fruitshop/apple.jpg" class="thumbnail zoomin" style="" rel="lightbox-6" title="Apple"><img src="/thumbnail/images/thumbnails/images/sampledata/fruitshop/apple-fit-218x163.jpg" alt="Яблоки" class="" style="" height="163" width="218"></a>
Please Log in or Create an account to join the conversation.
- lemonmagic
-
Topic Author
- Offline
- Новый участник
-
- Posts: 5
- Thank you received: 0
Just switched to Slimbox, and yes there is a "rel" tag now.
But can we change the Value for our Images manually?
Checking on my Site with Slimbox, opening a Blog View with many Articles, Slimbox pops up with 28 Images in Line, all having the same group ID..
For Example, if you run a Website about different Fruits, I would like to set group ID's to Images with the same Fruit, like "Apple" & "Pears"
Please Log in or Create an account to join the conversation.
Give me link to your site.
Please Log in or Create an account to join the conversation.
- lemonmagic
-
Topic Author
- Offline
- Новый участник
-
- Posts: 5
- Thank you received: 0
You can check an example here:
2015.schoenruh.com/de/zimmer/zimmer-suiten
Rooms are grouped into Tabs, and the Lightbox shifts through all Rooms which is confusing,
so I would like to group Images "room1", "room2" , "room3", ...
Please Log in or Create an account to join the conversation.
It's not blog of articles, it's one article. So plugin groups all images to one group.
You can change it in your template.
1. Set attribute data-group="<group id>" for images
2. Copy files from plugins/content/mavikthumbnails/tmpl
to templates/<your template>/html/plg_content_mavikthumbnails
3. Edit file templates/<your template>/html/plg_content_mavikthumbnails/magnific.php:
replace
$html .= '<a href="'.$this->info->original->url.'" class="'.$class.' zoomin magnific-popup-'.$this->plugin->item->id.'" style="'.$this->linkStyle.'" title="'.$this->image->getAttribute('alt').'">';
to
$groupId = $this->image->getAttribute('data-group');
$html .= '<a href="'.$this->info->original->url.'" class="'.$class.' zoomin magnific-popup-'.$groupId.'" style="'.$this->linkStyle.'" title="'.$this->image->getAttribute('alt').'">';
Please Log in or Create an account to join the conversation.