[opencms-dev] Limit results show with cms:contentload

Siegfried Puchbauer siegfried.puchbauer at gmail.com
Mon Jan 9 16:10:39 CET 2006


there are parameter for contentload:
pageSize, pageIndex and pageNavLength

example code:
...
<cms:contentload     collector="allInFolderPriorityDateDesc"
            param="/news/newsitem_${number}.html|xmlcontent"
            pageSize="${property.element-count}"
            pageIndex="${param.page}"
            pageNavLength="10"
            editable="true"><cms:contentinfo var="info" scope="page"/>

... (your output here)

</cms:contentload>

...

<h1>Seite <c:out value="${info.pageIndex}"/> von <c:out value="${
info.pageCount}"/></h1>
    <ul id="nav">
    <c:forEach var="i" begin="${info.pageNavStartIndex}" end="${
info.pageNavEndIndex}">
        <c:choose>
                <c:when test="${info.pageIndex==i}">
                    <li><b> » Seite <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>"> » Seite
<c:out value="${i}"/>    </a></li>
                </c:otherwise>
        </c:choose>
    </c:forEach>
    </ul>
...

hth
2006/1/9, Thierry Collogne <tcollogne at hotmail.com>:
>
> Hi all,
>
> I have a custom xml content and use the following code to display
>
> <cms:contentload collector="allInFolderDateReleasedDesc"
> param="/playground/events/news_${number}.html|wdog_article"
> editable="true">
>                                 <h2><cms:contentshow element="Title"
> /></h2>
>                                 <c:set var="dateString"><cms:contentshow
> element="Release"/></c:set>
>                                 <p><%
>                                         long date =
> Long.parseLong(pageContext.getAttribute("dateString").toString());
>                                         out.print(
> CmsDateUtil.getDateTimeShort(date ));
>                                     %>
>                                 </p>
>                                 <cms:contentcheck ifexists="Image">
>                                         <img
> src="<cms:link><cms:contentshow element="Image"/></cms:link>">
>                                 </cms:contentcheck>
>                                 <p><cms:contentshow element="Text"/></p>
> </cms:contentload>
>
> How can I limit the results shown? I have tried to examine the
> template-one
> template, but I can't figure it out
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>



--
Mit freundlichen Grüßen

Siegfried Puchbauer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060109/4ff54c12/attachment.htm>


More information about the opencms-dev mailing list