Numero 21
Numero 21

Reputation: 265

Create a custom contentload on opencms and jstl

I am new to using OpenCms and Jstl, I should list some files for the "data" field in their properties, I tried to use some methods:

<c:forEach items="<%=folderFilesList%>" var="folderFile" varStatus="counterFile">
                                                <c:set var="fileName">${fn:toLowerCase(folderFile.getName())}</c:set>
                                                <c:set var="fileUri">${fn:replace(folderFile.getRootPath(),'/sites/default','')}</c:set>
                                                <c:set var="fileDate"><cms:property name="data" file="${fileUri}"/></c:set>
                                                <c:if test="${folderFile.getTypeId() == 4000}">
                                                            <cms:contentload collector="singleFile" param="${fileDate}" pageIndex="${page}"  pageSize="${pagesize}" editable="false">

But nobody gives me the desired result. They go into error saying that they cannot access the resource or that the parameter is null even if it is set correctly. Unfortunately, working directly on the platform, I can't go into debugging to understand the reason for the error. How can I make it read the resource and list the files in descending order having the date as a parameter?

Upvotes: 1

Views: 16

Answers (0)

Related Questions