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.

All other Modules

Discuss all other Modules here.

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

Image Gallery Extension: Testers Needed


Reply

417 Posts   77875 Views

Avatar
AdamJ

9 June 2009 at 2:45am Community Member, 145 Posts

Hey UC,

I found a thread over in your area here http://silverstripe.org/dataobjectmanager-module-forum/show/261567#post261567 which covered getting the images, which works for me too. Can I get some pointers on formatting the images in the template?

Avatar
UncleCheese

9 June 2009 at 2:55am 4085 Posts

Like this?

<% control RecentImages %>
<% control Image %>
<% control CroppedImage(100,100) %>
<img src="$URL" alt="" />
<% end_control %>
<% end_control %>
<% end_control %>

Avatar
AdamJ

9 June 2009 at 3:13am Community Member, 145 Posts

Yeah, thats what I was meaning, but it doesnt work for me. Also, with this function:

function RecentImages()
{
return DataObject::get("ImageGalleryImage", null, "Created DESC", null, 5);
}

should I have access to the caption etc, or will I need to add a left join to the get?

Avatar
UncleCheese

9 June 2009 at 3:28am 4085 Posts

No, ImageGalleryImage is a DataObject containing the Caption, and linked album and image, so you should be fine.

Avatar
Leo1305

16 June 2009 at 8:32am Community Member, 6 Posts

Hi,

is it possible to show the filename in the image popup ??

greetings leo

Avatar
UncleCheese

16 June 2009 at 8:36am 4085 Posts

Sure, just edit your mysite/templates/Layout/ImageGalleryPage_album.ss, and add $Image.Title before (or after) the $Caption.

Avatar
Leo1305

17 June 2009 at 7:24am Community Member, 6 Posts

i think you misunderstanded me. i want to show the filename in the image popup for example if i use thickbox in the footer next to the page navigation.

thanks and sorry for my bad english :)

Avatar
UncleCheese

17 June 2009 at 7:31am 4085 Posts

I don't believe Thickbox allows you to put content by the navigation, but you could probably put something together using the example i gave you with a little bit of HTML in it.