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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

ImageGallery show prev/next when no imgs

Go to End



Community Member, 19 Posts

19 June 2010 at 11:43pm

i did a fresh install for the imageGallery on Silverstripe 1.4 from svn and everything went smooth.
i renamed the default album and published, so thew page would be there and the the moderators could upload their images.

the template then rendered the previous and next buttons, although the album was empty.
after uploading one image the buttons were gone.

well thats noting that would make the earth shake, but still strange.

i slightly changed the template (see below)
but i dont think i deleted something important

<div id="primaryContent">
<div class="innerpad">
		<% if GalleryItems.MoreThanOnePage %>
			<ul id="pagination-imagegallery">		
				<% if GalleryItems.NotFirstPage %>
					<li class="previous"><a title="<% _t('VIEWPREVIOUSPAGE','View the previous page') %>" href="$GalleryItems.PrevLink">&laquo;<% _t('PREVIOUS','Previous') %></a></li>				
				<% else %>	
					<li class="previous-off">&laquo;<% _t('PREVIOUS','Previous') %></li>
				<% end_if %>
				<% control GalleryItems.Pages %>
					<% if CurrentBool %>
						<li class="active">assadsa $PageNum</li>
					<% else %>
						<li><a href="$Link" title="<% sprintf(_t('VIEWPAGENUMBER','View page number %s'),$PageNum) %>">$PageNum</a></li>				
					<% end_if %>
				<% end_control %>
				<% if GalleryItems.NotLastPage %>
					<li class="next"><a title="<% _t('VIEWNEXTPAGE', 'View the next page') %>" href="$GalleryItems.NextLink"><% _t('NEXT','Next') %> &raquo;</a></li>
				<% else %>
					<li class="next-off"><% _t('NEXT','Next') %> &raquo;</li>				
				<% end_if %>
		<% end_if %>
	<% if Albums %>
	<% end_if %>