[Zope] Add Property to DTML Documents
Steve Rauch
srauch@u.washington.edu
Thu, 2 Dec 1999 12:54:10 -0800 (PST)
I uploaded 200 existing html files to a Zope folder as DTML Documents. THe
files were named with a pre-Y2K scheme ala: hb980712.html
I want to add a date Property that in this example would be 1998/07/12
I added a few dates manually when I decided to create a simple External
Method called "hbdate" that gets self.id() and slices it and appends the
19 and the /s.
In my article folder I have DTML Method that looks like this:
<!--#in objectValues-->
<dtml-unless date>
<dtml-if "meta_type=='DTML Document'">
<dtml-var hbdate>
</dtml-if>
</dtml-unless>
<!--#/in-->
and it produces the appropriate date value for all the DTML Documents.
When I replace the <dtml-var hbdate> with:
<dtml-call "manage_addProperty('date', hbdate, 'date')">
I get following Zope Error:
Error Type: Invalid Date-Time String
Error Value:
In viewing the source of Zope frame I can see the values for the files,
but I also see a blank double space before the first value as if the
external method is evaluating some extra document that does not produce a
value.
What have I done wrong?
Steve Rauch srauch@u.wahington.edu