Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Imagegallery Pagination troubles

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: 1157 Views
  • Cota
    Avatar
    Community Member
    6 Posts

    Imagegallery Pagination troubles Link to this post

    I'm pretty sure its just me....I have the image gallery up and running. It shows the correct number of images per page, however, no pagination shows. I'm doing a custom template for it, but dont know what to stick in there to get the pagination to show. Any help would be appreciated.

    Cota

  • UncleCheese
    Avatar
    4085 Posts

    Re: Imagegallery Pagination troubles Link to this post

    Can I see your template?

  • Cota
    Avatar
    Community Member
    6 Posts

    Re: Imagegallery Pagination troubles Link to this post

    <% base_tag %>
    <% include header %>
    <!-- CONTENT -->
       <div id="container">
       <div id="leftCont">
       <div id="shadowBox">
       <div id="boxImg"><img src="themes/angela/images/placeHolder.jpg" width="315" height="278" border="0" /></div>
    </div>
    <div id="orangeBoxHome">
                <div id="homeText">$Content</div>
             </div>
    </div>
    <div id="rightCont">
       <div id="pageTitle">$Title</div>
    <div id="pageContent">
                <div class="gallery-layout-wrapper">
                   <% if GalleryItems %>
                      <ul class="gallery-layout" id="gallery-list">
                         <% if GalleryItems.NotFirstPage %>
                            <% control PreviousGalleryItems %>
                               <li style="display:none;">$GalleryItem</li>
                            <% end_control %>
                         <% end_if %>
                   <% control GalleryItems %>
                   <li>
                      $GalleryItem
                   </li>
                   <% end_control %>
                   <% if GalleryItems.NotLastPage %>
                   <% control NextGalleryItems %>
                   <li style="display:none;">$GalleryItem</li>
                   <% end_control %>
                   <% end_if %>
                   </ul>
                   <% end_if %>
                </div>
             </div>
    </div>
          <div class="clear"><!-- FILLER --></div>
    </div>
    <div class="clear"><!-- FILLER --></div>
    <!-- END CONTENT -->

    <% include footer %>

  • UncleCheese
    Avatar
    4085 Posts

    Re: Imagegallery Pagination troubles Link to this post

    Something like this?

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

  • Cota
    Avatar
    Community Member
    6 Posts

    Re: Imagegallery Pagination troubles Link to this post

    Perfect. I knew it was just me. I went through the templates that came packaged with ImageGallery and couldnt seem to find that anywhere. I went through the forums and came up empty, finally just decided to ask.

    ImageGallery is a bad ass little module. Saved me a weeks worth of work.

    P.S.
    Stupid me, thank you very much!

  • UncleCheese
    Avatar
    4085 Posts

    Re: Imagegallery Pagination troubles Link to this post

    Thanks.. Yeah, ImageGallery is a mixed blessing. If you're expecting it to do what it does, then it's a home run, but as soon as you want your gallery to behave differently, you quickly figure out that you're stuck in a box. I've tried to make it as customizable as possible, but it's still essentially a turnkey solution without a ton of flexibility unless you want to get your hands dirty doing some programming. It's nice that there's a lower entry point with ImageDOM, so users can build up, rather than hack down, their galleries.

    1157 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.