[Zope] How to check for a folder's existence and create it if it doesn't
exist?
Chris Muldrow
muldrow@mac.com
Wed, 28 Feb 2001 11:40:31 -0500
I'm trying create a method to go through a site and create certain folders
if they don't already exist. I can check for the existence of the folders
with this:
<dtml-in expr="objectValues('Folder')">
<dtml-if "id=='2001'">
It matches<p>
</dtml-if>
</dtml-in>
But how do I craft the "else" to create the folder? Obviously, if I throw
the <dtml-else> inside the "in" loop, it'll throw itself into the "else"
action for every iteration where it doesn't find the named folder.
-- Chris Muldrow, muldrow@mac.com