|
<!-- Use for displaying prev and next page links on your current page --> |
|
|
|
<!-- Get the next and previous document from the current document --> |
|
<% for document,documentIndex in @getCollection('projects').toJSON(): %> |
|
|
|
<!-- Get the current document, from there, we will be able to get the next and previous --> |
|
<% if @document.id is document.id: %> |
|
|
|
<!-- We have the current document, do the next and previous buttons --> |
|
|
|
<!-- Check if we have a previous page --> |
|
<% if documentIndex >= 1: %> |
|
<a href="<%= @getCollection('projects').toJSON()[documentIndex-1].url %>" class="previous"><img src="/images/lft_arrow.png" alt="" /></a> |
|
<% end %> |
|
|
|
<!-- Check if we have a next page --> |
|
<% if documentIndex < @getCollection('projects').length - 1: %> |
|
<a href="<%= @getCollection('projects').toJSON()[documentIndex+1].url %>" class="next"><img src="/images/rt_arrow.png" alt="" /></a> |
|
<% end %> |
|
|
|
<% end %> |
|
<% end %> |
This comment has been minimized.
brickcap commentedApr 14, 2013
Looks like the paged plugin link is broken.