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


Go to End
Reply


417 Posts   80745 Views

Avatar
AdamJ

Community Member, 145 Posts

9 June 2009 at 2:45am

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

Forum Moderator, 4096 Posts

9 June 2009 at 2:55am

Like this?

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

Avatar
AdamJ

Community Member, 145 Posts

9 June 2009 at 3:13am

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

Forum Moderator, 4096 Posts

9 June 2009 at 3:28am

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

Avatar
Leo1305

Community Member, 6 Posts

16 June 2009 at 8:32am

Hi,

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

greetings leo

Avatar
UncleCheese

Forum Moderator, 4096 Posts

16 June 2009 at 8:36am

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

Avatar
Leo1305

Community Member, 6 Posts

17 June 2009 at 7:24am

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

Forum Moderator, 4096 Posts

17 June 2009 at 7:31am

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.

Go to Top