[Zope-CMF] How to check if an object exists?
Josef Albert Meile
jmeile@hotmail.com
Fri, 12 Oct 2001 10:56:25 -0000
How can I know if an object (ie: a picture) exists?
I have its url, let's say:
http://localhost:8080/MainPortal/myObjects/test
I know I can make a loop with the "dtml-in" tag, but it isn't the
best solution, for if you have too much objects on the folder, it
will take too long.
I have tried to do the following but I got an error because the
resource doesn't exists:
<dtml-if "REQUEST.resolve_url
('http://localhost:8080/MainPortal/myObjects/test')">
This resource exist
<dtml-else>
This resource doesn't exist.
</dtml-if>
I don't have this error when the object exists.
What can I do to know if it exists?