Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

is it possible: set / group of images from single thumbnail?


Go to End


5 Posts   2008 Views

Avatar
pinkp

Community Member, 182 Posts

29 September 2009 at 9:44pm

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!!

Avatar
hank1000

Community Member, 5 Posts

29 September 2009 at 11:32pm

Edited: 29/09/2009 11:33pm

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

Avatar
UncleCheese

Forum Moderator, 4102 Posts

30 September 2009 at 3:56am

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

Avatar
pinkp

Community Member, 182 Posts

30 September 2009 at 8:48am

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

Avatar
UncleCheese

Forum Moderator, 4102 Posts

30 September 2009 at 9:28am

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.