10379 Posts in 2194 Topics by 1710 members
| Go to End | ||
| Author | Topic: | 2558 Views |
-
Re: ImageGallery images not showing

8 December 2009 at 11:39am
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.
-
Re: ImageGallery images not showing

8 December 2009 at 11:44am Last edited: 8 December 2009 12:07pm
...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
-
Re: ImageGallery images not showing

8 December 2009 at 12:08pm Last edited: 8 December 2009 12:15pm
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
-
Re: ImageGallery images not showing

8 December 2009 at 1:14pm
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.
| 2558 Views | ||
| Go to Top |


