AW: [opencms-dev] Usage of pageNavLengthin<cms:contentload>[googlebar]

Wiesner, Daniel daniel.wiesner at av-studio.de
Tue Mar 29 15:48:46 CEST 2005


Hi Stefan,

 

thank you. The page works now.

 

<cms:contentload>

 

      collector="${property.collector}" 

      param="${property.newsfolder}news_${number}.html|80"  

      pageSize="5" 

      pageIndex="${param.page}" 

      pageNavLength="10" 

      editable="true">

<cms:contentinfo var="info" scope="page"/>

..

 

</cms:contentload>

 

 

<c:if test="${info.pageIndex>1}">

      <a href="<cms:link><cms:info property="opencms.request.uri"
/><c:out value="?page=${info.pageIndex-1}"/></cms:link>">back</a> 

</c:if>

<c:forEach var="i" begin="${info.pageNavStartIndex}"
end="${info.pageNavEndIndex}">

  <c:choose>

      <c:when test="${info.pageIndex==i}">

                  <b><c:out value="${i}"/></b>

      </c:when>

      <c:otherwise>

                  <a href="<cms:link><cms:info
property="opencms.request.uri" /><c:out
value="?page=${i}"/></cms:link>"><c:out value="${i}"/></a> 

      </c:otherwise>    

  </c:choose>

</c:forEach>

<c:if test="${info.pageIndex < info.pageCount}">

      <a href="<cms:link><cms:info property="opencms.request.uri"
/><c:out value="?page=${info.pageIndex+1}"/></cms:link>">next</a> 

</c:if> 

 

 

But the pagee works only  after the closing contentload tag. Is there
also a way to put the pager on the top of the list?

 

Daniel 

 

 

-----Ursprüngliche Nachricht-----
Von: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Stephan Hartmann
Gesendet: Dienstag, 29. März 2005 12:18
An: The OpenCms mailing list
Betreff: Re: [opencms-dev] Usage of
pageNavLengthin<cms:contentload>[googlebar]

 

Hi Daniel,

 

you can use

pageIndex="${param.page}"

 

To build a navigation, place this inside your contentload tag:

 <cms:contentinfo var="info" />

this stores a bean of type org.opencms.jsp.CmsContentInfoBean in your

context (you may also specify a scope attribute).

I use JSTL to retrieve the information of this bean (after the closing

contentload tag).

Interesting for you may be the bean properties pageIndex,
pageNavStartIndex

and pageNavEndIndex.

 

Regards,

Stephan

 

----- Original Message -----

From: "Wiesner, Daniel" <daniel.wiesner at av-studio.de>

To: <marc.fievet at coditel.net>; "'The OpenCms mailing list'"

<opencms-dev at opencms.org>

Sent: Monday, March 28, 2005 10:28 PM

Subject: AW: [opencms-dev] Usage of

pageNavLengthin<cms:contentload>[googlebar]

 

 

pageSize="5" - items per page

pageIndex="1" - actual pagenumber

pageNavLength="10" - goolgebarlength

 

"pageIndex" is the one witch should be variable. But pageIndex="<%=

request.getParameter("page") %>" does not work

 

Daniel

 

-----Ursprüngliche Nachricht-----

Von: opencms-dev-bounces at opencms.org

[mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Marc Fievet

Gesendet: Montag, 28. März 2005 22:10

An: The OpenCms mailing list

Betreff: RE: [opencms-dev] Usage of pageNavLength

in<cms:contentload>[googlebar]

 

 

 

 

Hello Daniel,

 

What are the functionalities of thoses parameters pageSize="5"
pageIndex="1"

pageNavLength="10" in your code?

 

thanks

 

MARC

 

 

Hello,

 

I am looking for a simple example for this feature.

 

The following is working:

 

<cms:contentload collector="${property.collector}"

param="${property.newsfolder}news_${number}.html|80"  pageSize="5"

pageIndex="1" pageNavLength="10" editable="true">

<h4><cms:contentshow element="Title" /></h4>

<p>

<cms:contentshow element="Teaser" />

</p>

</cms:contentload>

 

 

But how should I build the Googlebar?

 

 

Daniel

 

________________________________________

Von: opencms-dev-bounces at opencms.org

[mailto:opencms-dev-bounces at opencms.org] Im Auftrag von sclee

Gesendet: Dienstag, 8. März 2005 09:30

An: opencms-dev at opencms.org

Betreff: [opencms-dev] Usage of pageNavLength in <cms:contentload>

 

Any effect by setting pageNavLength in the <cms:contentload> tag? How to

show Google-like page navigation in web pages?

 

 

_______________________________________________

This mail is send to you from the opencms-dev mailing list

To change your list options, or to unsubscribe from the list, please
visit

http://mail.opencms.org/mailman/listinfo/opencms-dev

 

 

 

_______________________________________________

This mail is send to you from the opencms-dev mailing list

To change your list options, or to unsubscribe from the list, please
visit

http://mail.opencms.org/mailman/listinfo/opencms-dev

 

 

_______________________________________________

This mail is send to you from the opencms-dev mailing list

To change your list options, or to unsubscribe from the list, please
visit

http://mail.opencms.org/mailman/listinfo/opencms-dev

 

 

 

 

_______________________________________________

This mail is send to you from the opencms-dev mailing list

To change your list options, or to unsubscribe from the list, please
visit

http://mail.opencms.org/mailman/listinfo/opencms-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050329/7e3d6a62/attachment.htm>


More information about the opencms-dev mailing list