[Zope] manage_delProperties woes
Kevin Kuo
kkuo@engin.umich.edu
Wed, 11 Jul 2001 17:29:12 -0400 (EDT)
Hi, I have some code that is suppose to delete DC.* properties from all
objects that can contain properties in a folder. Right now it's
generating an error. See for yourself by taking out the try and except
statements. The next step is to generalize this so that is can
recursively go through the site.
The code is as follows:
<dtml-var standard_html_header>
<dtml-call
"REQUEST.set('DcList',['DC.title','DC.things','DC.happy','DC.Tuesday'])">
<dtml-in objectValues>
<dtml-let currentObject=sequence-var-id>
<dtml-in propertyItems>
<dtml-let currentProperty=sequence-key>
<dtml-if
expr="_.string.split(currentProperty,'.')[0]=='DC'">
Delete property: <dtml-var
currentProperty><br>
<dtml-try>
<dtml-call
expr="manage_delProperties(currentProperty)">
<dtml-except>
</dtml-try>
</dtml-if>
</dtml-let>
</dtml-in>
</dtml-let>
<br>
</dtml-in>
<dtml-var standard_html_footer>
Thanks in advance...
kevin
kkuo@umich.edu