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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

ImageGallery images not showing


Go to End


12 Posts   11639 Views

Avatar
okotoker

Community Member, 50 Posts

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.

Avatar
mephzara

Community Member, 18 Posts

8 December 2009 at 11:44am

Edited: 08/12/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

Avatar
mephzara

Community Member, 18 Posts

8 December 2009 at 12:08pm

Edited: 08/12/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

Avatar
UncleCheese

Forum Moderator, 4102 Posts

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.

Go to Top