hi!
how to prepare Silverstripe to be able to add the lightbox effect to the link in the image?
Sorry for my english :)
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
hi!
how to prepare Silverstripe to be able to add the lightbox effect to the link in the image?
Sorry for my english :)
Hi,
we use pirobox here (same thing really) and it is very easy...
Add pirobox (in the require page init)...
Requirements::css('DIRECTORY/pirobox/style.css');
Requirements::javascript('DIRECTORY/pirobox/pirobox.min.js');
Requirements::javascript('DIRECTORY/pirobox/pirobox.config.js');
then when you are placing your images on the page in your template do something like this...
<% if MyImages %>
<p>
<% control MyImages %>
<a href="$URL" title=" " class="pirobox_gall">
<% control SetWidth(120) %>
$Tag
<% end_control %>
</a>
<% end_control %>
</p>
<% end_if %>
barry
Thank you for your reply. But this solution is unsatisfactory. For me it's not a problem but for inexperienced users it can be a difficult. Modification of the admin panel would be the optimal solution. For me it is too difficult. I believe that experienced developers of this forum will find a solution to this problem.
Ok, well, what you want is a module - actually a combination of image gallery/uploadify/dom should do it.
I think the solution is not so complicated. All you need to do is add to the link new attribute - "rel" and add to the header of page the address of the script which run the gallery effect. I can not modify the panel in the part responsible for adding the link to create a new option with the attribute "rel". Maybe you know which files should be modified?