Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » is it possible: set / group of images from single thumbnail?

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1222 Views
  • pinkp
    Avatar
    Community Member
    168 Posts

    is it possible: set / group of images from single thumbnail? Link to this post

    Sorry if this has already been covered but did not find anything so far.

    Is it possible to have a set of images appear in the lightbox from a single thumbnail (not in there own album). I know it is using lightbox scripts normally. But can this be done using the ImageGallery Module?

    Many Thanks!!

  • hank1000
    Avatar
    Community Member
    5 Posts

    Re: is it possible: set / group of images from single thumbnail? Link to this post

    Sorry dont now but i dont think you can with lightbox2 have you got the image module working because im having probs with that.
    Thanks Daz

  • UncleCheese
    Avatar
    4085 Posts

    Re: is it possible: set / group of images from single thumbnail? Link to this post

    If there is a Lightbox that supports this, you should create a new UI plugin for ImageGallery so that we can all use it!

  • pinkp
    Avatar
    Community Member
    168 Posts

    Re: is it possible: set / group of images from single thumbnail? Link to this post

    I don't have the skills to create a new UI plugin, unfortunately.

    Maybe I haven't been specific enough.

    Currently ImageGallery uses rel="shadowbox[gallery]" to link the images when they pop up in to a set.
    What would be useful is if you could choose and change the [gallery] part which links them.

    So each thumbnail just has rel="shadowbox" and opens on its own. Then you could choose when you desire a set, these images would then become rel="shadowbox[set1]". However the images would not be visible as thumbnails only the first one.

    <a href="photos/one.jpg" rel="lytebox[set1]" title="Blah blah blah! caption"><img src="photos/one.jpg" alt="photo1" width="145" height="100" border="0" class="image" id="photo1" title="Blah blah blah! hover title" /></a>

    <a href="photos/two.jpg" rel="lytebox[set1]" title="Blah blah blah!"></a>
    <a href="photos/three.jpg" rel="lytebox[set1]" title="Blah blah blah!"></a>

    Also if you have two title="" it produces one for the hover title and a second for the caption.

    Perhaps I should of posted this in the features. It's easy enough when hard coded. But would be very useful for the CMS. Hope that makes sense! Thanks

  • UncleCheese
    Avatar
    4085 Posts

    Re: is it possible: set / group of images from single thumbnail? Link to this post

    Yeah, you would just create a custom ImageGalleryPage and ImageGalleryItem class.

    class MyImageGalleryPage extends ImageGalleryPage
    {
    protected $itemClass = "MyImageGalleryItem";
    }

    class MyImageGalleryItem extends ImageGalleryItem
    {
    static $db = array ('Set' => 'Varchar(20)');
    function getCMSFields()
    {
    $f = parent::getCMSFields();
    $f->push(new TextField('Set');
    return $f;
    }
    }

    Then, create a new UI plugin (which I have yet to document), but you can use the existing plugins in image_gallery/gallery_ui/ as examples.

    1222 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.