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

Working Gallery Plugin for SS 3


Reply


106 Posts   12804 Views

Avatar
bod

Community Member, 72 Posts

22 October 2012 at 1:26pm

Hi FutureWeb,

Hope you don't mind, but I need to pick your brains,

I have a holder ss template which lists it's children both of which extend from the gallery page - how would I get the holder page to display the first image in the gallery for the child page as a thumb?

have tried

<% control getGalleryImages(1) %>
<div class="galleryItem">       
   $Image.SetSize(100,100)
</div>
<% end_control %>

but no joy, any ideas? Do I also need to adjust the php Class for the holder template to create a relationship somehow or should just the right call in the .ss template work?

Thanks in advance if you can point me in the right direction

Avatar
bod

Community Member, 72 Posts

22 October 2012 at 10:54pm

Okay so,

<% control GalleryImages.First %>

works perfect - sorry it was late and my brain wasn't in gear. Carry on.

Avatar
Futureweb

Community Member, 233 Posts

23 October 2012 at 8:51am

@ Optic Blaze - looks interesting, I'll take a your add 'enhanced version' soon...
Agree - a bulk way of a attaching existing images in the 'assets' area could be handy. I'll add that to the list of things to look at.

@MartinPhone - thanks for pointing out the links on SilverstripeResources.com, they're fixed now

@Bod - sorry, was away over the weekend, looks like you've fixed your probs?

Avatar
Wezzlee

Community Member, 28 Posts

30 October 2012 at 11:55am

Hi futureweb,

First of all thank you for creating this module!

Everything works for me in the CMS, but the images are not displayed on the gallerypage that I have created. Am I missing something? Do I need to include a dynamic value in the content field that will display the images. Also the HTML shows me no output.

Please let me know when you need more details.

Thanks,

Wesley

Avatar
Futureweb

Community Member, 233 Posts

30 October 2012 at 12:05pm

Hi Wezzlee - first thing to check - did you run mysite.com?flush=all on your gallery page to make sure silverstripe is finding the gallery template?

if you view the source code you should at least see a div tag like this: <div id="galleryArea">... </div>

Jon

Avatar
MartinPhone

Community Member, 57 Posts

30 October 2012 at 1:43pm

Hi everyone,

getting this slideshow module to work with the default popup lightbox type behaviour has been simple enough, however I really wanted to have something a bit similar to Galleriffic, where you have a bunch of thumbs and a main image that changes. Getting the .ss parts in the right place seems ok, but I'm tearing my hair out when it comes to the formatting of it as it the typography css seems to just override some elements and ... well I guess it's all just CSS but the beautiful demos which come with pages with quite specific page and CSS structure I'm finding harder than I really should ...

Anyone have any tips when it comes to integrating another jqueryish slideshow with this module? Even just an approach would be good. I'm feeling a bit dumb.

Avatar
Optic Blaze

Community Member, 165 Posts

30 October 2012 at 7:10pm

@MartinPhone

I integrated the prettyPhoto jquery lightbox plugin with the gallery that futureweb made.

look here:

http://www.silverstripe.org/all-other-modules/show/20465?start=24#post317634

Avatar
Wezzlee

Community Member, 28 Posts

31 October 2012 at 3:42am

Hi Jon,

I did a "?flush=all" for the homepage/ root and also for "admin/pages?flush=all" except for the gallery page. As soon as I am at home I will also run this for the Gallery Page. I will keep you posted.

Thank you,

Wesley