Updated request parameter name to handle pagination in view results
authorThierry Florac <tflorac@ulthar.net>
Thu, 14 Feb 2019 16:26:37 +0100
changeset 420 81157b27cd0f
parent 419 38df143ffb61
child 421 d13e43fc1d21
Updated request parameter name to handle pagination in view results
src/pyams_default_theme/shared/view/portlet/templates/view-items-list.pt
--- a/src/pyams_default_theme/shared/view/portlet/templates/view-items-list.pt	Thu Feb 14 12:40:11 2019 +0100
+++ b/src/pyams_default_theme/shared/view/portlet/templates/view-items-list.pt	Thu Feb 14 16:26:37 2019 +0100
@@ -3,7 +3,7 @@
 	 i18n:domain="pyams_default_theme">
 	<h2>${i18n:settings.title}</h2>
 	<div class="search-results"
-		 tal:define="start int(request.params.get('start', 0));
+		 tal:define="start int(request.params.get('vstart', 0));
 					 limit (start + renderer_settings.page_size) if renderer_settings.paginate else 999;
 					 items settings.get_items(request, limit);
 					 global count 0;
@@ -50,14 +50,14 @@
 			<ul class="pager">
 				<li class="previous"
 					tal:condition="start > 0">
-					<a href="${request.path_url}?start=${start - renderer_settings.page_size}">
+					<a href="${request.path_url}?vstart=${start - renderer_settings.page_size}">
 						<span aria-hidden="true">&larr;</span>
 						<i18n:var translate="">Previous</i18n:var>
 					</a>
 				</li>
 				<li class="next"
 					tal:condition="count == renderer_settings.page_size">
-					<a href="${request.path_url}?start=${start + count}">
+					<a href="${request.path_url}?vstart=${start + count}">
 						<i18n:var translate="">Next</i18n:var>
 						<span aria-hidden="true">&rarr;</span>
 					</a>