[opencms-dev] Filter XML contentload?
Stanczak Group
justin at stanczakgroup.com
Tue Oct 10 23:22:45 CEST 2006
Here's what I've come up with using xmldemo examples. Is this correct?
One problem I have found it the edit button shows for all even though
the content isn't rendered, how can I fix that? Is there a better method?
<%
CmsJspXmlContentBean cmsArticle = new CmsJspXmlContentBean(pageContext,
request, response);
I_CmsXmlContentContainer container =
cmsArticle.contentload("allInFolderDateReleasedDesc",
"/articles/items/article_${number}.html|article|7", false);
while (container.hasMoreContent()) {
if(!Boolean.valueOf(cmsArticle.contentshow(container, "Archive"))){
%>
<h3><a href="<cms:link><%= cmsArticle.contentshow(container,
"${opencms.filename}") %></cms:link>"><%=
cmsArticle.contentshow(container, "Title") %></a></h3>
<p><%= cmsArticle.contentshow(container, "Teaser") %></br><small>By <%=
cmsArticle.contentshow(container, "Author") %> <a href="<cms:link><%=
cmsArticle.contentshow(container, "${opencms.filename}")
%></cms:link>">read more...</a></small></p>
<% } } %>
Stanczak Group wrote:
> No takers on this? Is this something easy? Am I missing it in the
> documentation?
>
> Stanczak Group wrote:
>> I want to make it so the news articles can be limited in some way.
>> Either by only allowing a certain number or better yet allow a
>> boolean value to archive them. How can I do this, I'm not finding any
>> good docs on this?
>>
>
--
Justin Stanczak
Stanczak Group
812-735-3600
"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke
More information about the opencms-dev
mailing list