[opencms-dev] The "new" button is not display when using the OpenCms API invoke lists in JSPs

Patric Dosch patric.dosch at virtual-identity.com
Wed Jan 4 11:56:34 CET 2017


Very old and ugly way to work with :)



I create lists with <cms:contentload collector="byContext" ... i.e working with solr. Since OenCms 8.5.
http://documentation.opencms.org/opencms-documentation/demos/lists-and-detail-pages/index.html

Since 10 there is a new way (But here I have no experience.)
http://documentation.opencms.org/opencms-documentation/demos/lists-and-detail-pages-ii/index.html




The nearest version to yours should be:
http://documentation.opencms.org/opencms-documentation/content-in-opencms/lists-of-resources-and-detail-pages/index.html


Regards, Patric




Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von tallship
Gesendet: Samstag, 24. Dezember 2016 18:49
An: opencms-dev <opencms-dev at opencms.org>
Betreff: [opencms-dev] The "new" button is not display when using the OpenCms API invoke lists in JSPs

Hi All,
I want to create a lists in JSPs using the OpenCms API,but the "new" button will not be shown on lists.
Who can help me with this issue?


________________________________


<%@ page import="java.util.*,org.opencms.jsp.*,org.opencms.file.*,org.opencms.xml.content.*" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>API</title>
<style>body{padding-top:100px;}</style>
<cms:editable/>
</head>
<body>
<ul>
<%
CmsJspXmlContentBean thisPage = new CmsJspXmlContentBean(pageContext, request, response);
I_CmsXmlContentContainer contentContainer = thisPage.contentload("allInSubTreeDateReleasedDesc", "/en/news/new_%(number).html|ttarticle", true);
  while (contentContainer.hasMoreContent()) {
  out.write("<li>"+ thisPage.contentshow(contentContainer, "Title") + "</li>");
}
%>
</ul>
 </body>
</html>

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


More information about the opencms-dev mailing list