Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » ImageGallery images not showing

Discuss all other Modules here.

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

Page: 1 2
Go to End
Author Topic: 3212 Views
  • okotoker
    Avatar
    Community Member
    41 Posts

    Re: ImageGallery images not showing Link to this post

    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.

  • mephzara
    Avatar
    Community Member
    17 Posts

    Re: ImageGallery images not showing Link to this post

    ...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...

    http://www.mephzara.com/content/irland/album/2003

    Regards

  • mephzara
    Avatar
    Community Member
    17 Posts

    Re: ImageGallery images not showing Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts

    Re: ImageGallery images not showing Link to this post

    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.

    3212 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.