Author: michiel
Date: 2010-03-18 16:56:24 +0100 (Thu, 18 Mar 2010)
New Revision: 41520
Modified:
speeltuin/mihxil/portal/trunk/src/main/resources/META-INF/tags/mm/portal/page.tagx
Log:
for the moment I want to have it work in 1.8 too
Modified:
speeltuin/mihxil/portal/trunk/src/main/resources/META-INF/tags/mm/portal/page.tagx
===================================================================
---
speeltuin/mihxil/portal/trunk/src/main/resources/META-INF/tags/mm/portal/page.tagx
2010-03-18 15:48:22 UTC (rev 41519)
+++
speeltuin/mihxil/portal/trunk/src/main/resources/META-INF/tags/mm/portal/page.tagx
2010-03-18 15:56:24 UTC (rev 41520)
@@ -18,11 +18,43 @@
<jsp:directive.variable name-from-attribute="id" alias="page"
variable-class="org.mmbase.bridge.Node" scope="AT_END" />
+ <!-- This would work in MMBase >= 1.9
<mm-portal:pages date="${date}">
<jsp:attribute name="constraints">
<mm:maxnumber value="1" />
</jsp:attribute>
<mm:node id="page" />
</mm-portal:pages>
+ -->
+ <!-- Want to have it work in MMBase 1.8 too -->
+
+ <c:choose>
+ <c:when test="${empty date}">
+ <mm:time id="now" time="now" write="false" />
+ </c:when>
+ <c:otherwise>
+ <mm:time id="now" time="${date}" write="false" />
+ </c:otherwise>
+ </c:choose>
+ <c:choose>
+ <c:when test="${empty _node}">
+ <mm:listnodescontainer type="pages" id="container" />
+ </c:when>
+ <c:otherwise>
+ <mm:relatednodescontainer type="pages" id="container" />
+ </c:otherwise>
+ </c:choose>
+ <mm:listnodescontainer referid="container">
+ <mm:constraint field="online" operator="lt" value="${now}" />
+ <mm:constraint field="offline" operator="gt" value="${now}" />
+ <mm:constraint field="show" value="true" />
+ <mm:sortorder field="online" direction="down" /> <!-- show the one which
went online most recently -->
+ <mm:maxnumber value="1" />
+ <mm:listnodes>
+ <jsp:doBody />
+ </mm:listnodes>
+ </mm:listnodescontainer>
+
+
</jsp:root>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs