Jump to:

5513 Posts in 1732 Topics by 1218 members

Customising the CMS

SilverStripe Forums » Customising the CMS » lightbox effect in the images on the page

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1112 Views
  • combinesom
    Avatar
    Community Member
    10 Posts

    lightbox effect in the images on the page Link to this post

    hi!

    how to prepare Silverstripe to be able to add the lightbox effect to the link in the image?

    Sorry for my english

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: lightbox effect in the images on the page Link to this post

    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

  • combinesom
    Avatar
    Community Member
    10 Posts

    Re: lightbox effect in the images on the page Link to this post

    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.

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: lightbox effect in the images on the page Link to this post

    Ok, well, what you want is a module - actually a combination of image gallery/uploadify/dom should do it.

  • combinesom
    Avatar
    Community Member
    10 Posts

    Re: lightbox effect in the images on the page Link to this post

    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?

    1112 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.