7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Image gallery different view
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1313 Views |
-
Image gallery different view

11 June 2009 at 11:14am
Hi, I'm pretty new with Silverstripe but mostly with the Image Gallery. I know a bit of PHP but I don't know where to start in this case.
I don't want to open the photos in any of the options given, I'd like to open them in a page like any normal page. Any tips where to start with this? I don't really like the lightbox/javascript things, I want something more simple.
Thanks,
Gabriel -
Re: Image gallery different view

11 June 2009 at 3:20pm
The right way to do it would be to extend the class into your custom implementation, but if you're new to SS and PHP, here's a possible hack of a solution.
Set the images per page to 1, set the thumbnail width to something large, say, 640px, and set the popup style to "none"
Ostensibly, that would have the same effect, wouldn't it?
-
Re: Image gallery different view

11 June 2009 at 6:38pm
In some way, yes it would be similar, but I'd lose the album view if I do that. If I have about 50 photos in the same album, and you want to look at a specific photo, it a bit more complicated for the end user.
I guess I'll have to live with the Javascript, I can't seem to understand how to do it, it's more complicated than dealing with Pages and Holders as shown in the docs ;) .
Thanks anyway.
Gabriel
-
Re: Image gallery different view

12 June 2009 at 2:16am
You would still have the album navigation in the subnav. Keep in mind you should be copying the ImageGallery templates into your mysite directory so you can customize them.
If you wanted images in lieu of numbers for pagination, you could do something like this:
function GalleryPagination()
{
$pages = new DataObjectSet();
$i=1;
foreach($this->GalleryItems() as $item) {
$pages->push(new ArrayData(array(
'ThumbnailURL' => $item->Image()->CroppedImage(50,50)->URL,
'Link' => $this->CurrentAlbum()->Link()."?start=".$i;
)));
$i++;
}
}Then something like
<% control GalleryPagination %>
<li><a href="$Link"><img src="$ThumbnailURL" /></a></li>
<% end_control %>Easy peasy!
-
Re: Image gallery different view

12 June 2009 at 5:14am
Something's not working with that, but I should be able to figure it out. Thanks a lot for that tip!
-
Re: Image gallery different view

5 January 2010 at 1:21pm
I'm trying to do this and I would like to know if anybody has any success in getting something like this to work? If so, please post your code.
What I want to do is change the thumbnail links to link to an image page instead of the lightbox things, so members can comment on & rate the images. The comments & ratings will be my own modifications as well.
| 1313 Views | ||
|
Page:
1
|
Go to Top |


