by
potato » Tue Jul 17, 2012 11:06 pm
hi again, I've been grappling with pagination - I am trying to have pagination on the page view of a clonable template and am not sure if it's possible to do this or not ...
The clonable template is events.php. In list view I am showing all future events in list order (summary details).
Page view shows the full details of an event PLUS the pagination - PREV / NEXT. But at the moment the pagination only works when you click through from the first event. The problem with clicking through from a later event is that the pagination loses its position - I guess it's always starting at the next event coming up.
My code is as follows:
- Code: Select all
<cms:if k_is_list >
<cms:pages masterpage='events.php' order='asc' show_future_entries='1' start_on="<cms:date format='Y-m-d' gmt='1' />" >
..... event details shown here ......
<a href="<cms:show k_page_link />">Full details</a>
</cms:pages>
<cms:else />
<cms:pages masterpage='events.php' order='asc' show_future_entries='1' start_on="<cms:date format='Y-m-d' gmt='1' />" limit='1' paginate='1'>
<div class="pagination">
<cms:if k_paginated_bottom >
<cms:if k_paginate_link_prev >
<a href="<cms:show k_paginate_link_prev />">« prev</a>
<cms:else/>
<span class="page_disabled">« prev</span>
</cms:if>
<a href="<cms:link 'events.php' />">back to all events</a>
<cms:if k_paginate_link_next >
<a href="<cms:show k_paginate_link_next />">next »</a>
<cms:else/>
<span class="page_disabled">next »</span>
</cms:if>
</cms:if>
</div>
</cms:pages>
</cms:if>
I've gone into a spin on this - am I missing something obvious?