Jump to:

7935 Posts in 1536 Topics by 943 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: 579 Views
  • ivo
    Avatar
    Community Member
    19 Posts

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

    hi
    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

    ImageGalleryPage_album.ss

    <div id="primaryContent">
    <div class="innerpad">
          <h2>$AlbumTitle</h2>
          $GalleryLayout
          
          <% 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 %>
             </ul>       
          <% end_if %>
       <% if Albums %>
          </div>
       <% end_if %>
    </div>   

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