[opencms-dev] pageSize calculation

Detlef Beyer d.beyer at crash.de
Wed May 2 10:27:09 CEST 2007


Hi,

I'm looking for a sample where the pageSize parameter of the 
contentload tag is different for page 2-n compared to page 1. I would 
like to show 5 hits on the first page and 10 hits on all following 
pages.
My problem is the pagenavigation in the footer - at the moment I'm using:

<c:if test="${collectorInfo.pageCount>1}">
	<ul class="nav">
	<c:forEach var="i" begin="${collectorInfo.pageNavStartIndex}" 
end="${collectorInfo.pageNavEndIndex}">
		<c:choose>
			<c:when test="${collectorInfo.pageIndex==i}">
				<li><b>» page <c:out 
value="${i}" /></b></li>
			</c:when>
			<c:otherwise>
				<li><a href="<cms:link><cms:info 
property="opencms.request.uri"/><c:out 
value="?page=${i}"/></cms:link>"> » page <c:out value="${i}"/> 
</a></li>
			</c:otherwise>
		</c:choose>
	</c:forEach>
	</ul>
</c:if>

but this logic results in different pages counts (as expected). On 
the first page the calculation is based on the 5 hits/page and on the 
following pages on 10hits/page. So on page 1 I get:

page >1 >2 >3 >4 >5 >6 >7

and on the following pages I get

page >1 >2 >3 >4

Any one with a nice "hack" for this?

Thanks,

Detlef



More information about the opencms-dev mailing list