7912 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Imagegallery Pagination troubles
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 992 Views |
-
Imagegallery Pagination troubles

30 March 2010 at 6:05am
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
-
Re: Imagegallery Pagination troubles

30 March 2010 at 6:45am
<% 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 %>
-
Re: Imagegallery Pagination troubles

30 March 2010 at 7:16am
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">«<% _t('PREVIOUS','Previous') %></a></li>
<% else %>
<li class="previous-off">«<% _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') %> »</a></li>
<% else %>
<li class="next-off"><% _t('NEXT','Next') %> »</li>
<% end_if %>
</ul>
<% end_if %> -
Re: Imagegallery Pagination troubles

30 March 2010 at 7:24am Last edited: 30 March 2010 7:40am
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! -
Re: Imagegallery Pagination troubles

30 March 2010 at 7:49am
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.
| 992 Views | ||
|
Page:
1
|
Go to Top |

