Use parameter name from data provider.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 22 Oct 2010 09:57:41 +0000 (11:57 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 22 Oct 2010 09:57:41 +0000 (11:57 +0200)
src/main/resources/templates/include/pagination.html
src/main/resources/templates/index.html

index 5601d97..a5efc97 100644 (file)
@@ -1,10 +1,10 @@
 <%if pagination.necessary>
        <div class="navigation">
-               <div class="first"><%if ! pagination.first><a href="<% request|change name=page value=0>">«</a><%else><span>«</span><%/if></div>
-               <div class="previous"><%if ! pagination.first><a href="<% request|change name=page key=pagination.previousPage>">‹</a><%else><span>‹</span><%/if></div>
+               <div class="first"><%if ! pagination.first><a href="<% request|change nameKey=pageParameter value=0>">«</a><%else><span>«</span><%/if></div>
+               <div class="previous"><%if ! pagination.first><a href="<% request|change nameKey=pageParameter key=pagination.previousPage>">‹</a><%else><span>‹</span><%/if></div>
                <div class="current-page"><% pagination.pageNumber></div>
                <div class="total-pages"><% pagination.pageCount></div>
-               <div class="last"><%if ! pagination.last><a href="<% request|change name=page key=pagination.lastPage>">»</a><%else><span>»</span><%/if></div>
-               <div class="next"><%if ! pagination.last><a href="<% request|change name=page key=pagination.nextPage>">›</a><%else><span>›</span><%/if></div>
+               <div class="last"><%if ! pagination.last><a href="<% request|change nameKey=pageParameter key=pagination.lastPage>">»</a><%else><span>»</span><%/if></div>
+               <div class="next"><%if ! pagination.last><a href="<% request|change nameKey=pageParameter key=pagination.nextPage>">›</a><%else><span>›</span><%/if></div>
        </div>
 <%/if>
index fc8eedb..a2b35b7 100644 (file)
@@ -5,6 +5,7 @@
        <div id="posts">
                <%getpage>
                <%paginate list=posts pagesize=2>
+               <%= page|store key=pageParameter>
                <%include include/pagination.html>
                <%foreach pagination.items post>
                        <%include include/viewPost.html>