That's right Piere, and than you need something like this in the JSP to
only show valid objects:

<%@ page import="java.util.*" %>

<% String thisTeaserHasAValidTransmissionAndExpireDate = ""; %>
<% String teaserConstraint =  "teasers.transmissiondate < " + (new
Date()).getTime()/1000
                                + " AND teasers.expiredate > " + (new
Date()).getTime()/1000 ;
%>
<%-- try to find the teaser with valid publication and expiration date
--%>
<mm:list nodes="my_website"
        path="site,posrel1,page,posrel2,teasers"
        fields="teasers.title" constraints="<%= teaserConstraint %>">
        <mm:field name="teasers.number" jspvar="dummy" vartype="String"
write="false">
                <% thisTeaserHasAValidTransmissionAndExpireDate = dummy;
%>
        </mm:field>
</mm:list>

Good luck.

Regards, Henk.

P.s. Ernst can this be faqed?

T. +31-(0)6-29054903
F. +31-(0)13-4680318
E. [EMAIL PROTECTED]
I. http://www.mmatch.nl

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:owner-users@;mmbase.org] 
> On Behalf Of Pierre van Rooden
> Sent: Wednesday, November 06, 2002 9:56 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Publication date?
> 
> 
> Joost Nelissen wrote:
> > Can anybody tell me if there's a good way to integrate a (future) 
> > publication date into a builder?
> > What i'd like to do is make it possible for a web-editor to 
> specify a 
> > future date and time for publication without having to create a 
> > Time-object first and then make a relation to it.
> > Is there any documentation on this subject?
> 
> If you do not want to use a time object, you can add a 'time' field:
> 
> <field>
>    <gui>
>      <guiname xml:lang="nl">Publicatietijd</guiname>
>      <guiname xml:lang="en">Publication time</guiname>
>      <guitype>eventtime</guitype>
>    </gui>
>    <editor>
>      <positions>
>        <input>5</input>
>        <list>5</list>
>        <search>5</search>
>      </positions>
>    </editor>
>    <db>
>      <name>publishtime</name>
>      <type state="persistent" notnull="false" 
> key="false">INTEGER</type>
>    </db>
> </field>
> 
> 
> 
> -- 
> Pierre van Rooden
> Mediapark, C 107 tel. +31 (0)35 6772815
> "Never summon anything bigger than your head."
> 
> 
> 


Reply via email to