Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » ImageGallery show prev/next when no imgs

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 590 Views
  • ivo
    Community Member
    19 Posts

    ImageGallery show prev/next when no imgs Link to this post

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

Page: 1
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.