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

ImageGallery images not showing


Reply

12 Posts   3288 Views

Avatar
okotoker

8 December 2009 at 11:39am Community Member, 41 Posts

Thanks for your input UncleCheese. At the end of the day it all comes down to the end user, which as you said MODx can be a bit cryptic and that a big part of why I am working with Silverstripe right now. Again thank you for your input on both the ImageGallery and Silversripe as a whole, it is appreciated.

Avatar
mephzara

8 December 2009 at 11:44am (Last edited: 8 December 2009 12:07pm), Community Member, 17 Posts

...overriding the ImageGalleryPage templates...

I suppose that's the keyword. I will check my templates. If I do not find the problem I will send you the template. The gallery itself can be viewed at...

[url]http://www.mephzara.com/content/irland/album/2003[/url]

Regards

Avatar
mephzara

8 December 2009 at 12:08pm (Last edited: 8 December 2009 12:15pm), Community Member, 17 Posts

The problem was solved by changing the following lines...

<ul class="gallery-layout">
                  <% if GalleryItems.NotFirstPage %>
                     <% control PreviousGalleryItems %>
                        <li style="display:none;"><a id="ViewLink-$ID" rel="$RelAttr" class="$ClassAttr" title="$Caption" href="$ViewLink"><img src="$ThumbnailURL" alt="$Title"/></a></li>
                     <% end_control %>
                  <% end_if %>
                  <% control GalleryItems %>
                     <li style="height:{$Top.ThumbnailSize}px;width:{$Top.ThumbnailSize}px;">
                           <a id="ViewLink-$ID" rel="$RelAttr" class="$ClassAttr" title="$Caption" href="$ViewLink"><img src="$ThumbnailURL" alt="$Title"/></a>
                     </li>
                  <% end_control %>
                  <% if GalleryItems.NotLastPage %>
                     <% control NextGalleryItems %>
                        <li style="display:none;"><a id="ViewLink-$ID" rel="$RelAttr" class="$ClassAttr" title="$Caption" href="$ViewLink"><img src="$ThumbnailURL" alt="$Title"/></a></li>
                     <% end_control %>
                  <% end_if %>
               </ul>


...of my old template to...

$GalleryLayout

I suppose that the old template code did disable some internal mechanics around the $GalleryItem - which seems to be newer?

This is a pretty good example that the separation of code and layout is not as easy as it sounds ;) Interfaces have to be stable and that is really a hard job.

Best regards & thanks for the really cool extension, your work and your help

Avatar
UncleCheese

8 December 2009 at 1:14pm 4085 Posts

Glad you figured it out. Yeah, that's one area of ImageGallery that I'm not especially proud of. Fortunately, I can blame the design pattern on Silverstripe's Gallery module, which is the origin of the GalleryLayoiut template variable. ImageGallery started as a rev of Gallery, so I think that technique just stuck around, and now it's just one big, ugly mega-function. Definitely on the list of things to rev.