[Zope-CMF] Automatic ID generation -- > Title Got it!

Ignacio Valdes ivaldes@hal-pc.org
Tue, 24 Apr 2001 18:17:17 -0500


Ivan Cornell wrote:

> > >  <dtml-call "REQUEST.set('ts', ZopeTime().strftime('%Y%m%d%H%M%S'))">
> > >  <dtml-with ts>
> > >  <tr valign="top">
> > >   <td> <br> </td>
> > >   <td colspan="2"> <strong> Folder Name or Resource Title: </strong>
> > >        <input type="text" name="id" value="<dtml-var ts>" size="50">
> > >        <input type="submit" value="Add"> </td>
> > >  </tr>
> > >  </dtml-with>
>
> >  <input type="hidden" name="id" value="<dtml-var ts>" size="50">
> >
>
> If you don't use ts anywhere else, you could simplify that whole lot to
> just:
> <input type="hidden" name="id" value="<dtml-var
> "ZopeTime().strftime('%Y%m%d%H%M%S'))">"
>
> or even:
>
> <input type="hidden" name="id" value="<dtml-var ZopeTime
> fmt="%Y%m%d%H%M%S">"
>
> Ivan
>

Good one, I'll have to look at it some more later. My wife is having a baby. -- IV