i am trying to see if the file cover.gif exists. the directory structure is: /palette4/2000-01-27/cover.gif. since the date is the variable "issue," i am having trouble stringing the whole statment together. <dtml-if "_.hasattr(PARENTS[-2].palette4,issue,'cover.gif')"> this clearly does not work. anybody have an idea? thanks, kyle
----- Original Message ----- From: Kyle Burnett <kburnett@ep.newtimes.com>
i am trying to see if the file cover.gif exists.
File, or Zope object? I'll assume object.
the directory structure is: /palette4/2000-01-27/cover.gif.
<dtml-if "_.hasattr(PARENTS[-2].palette4,issue,'cover.gif')">
Can the named issue (a string, right?) be presumed to exist? If so, <dtml-if "_.hasattr(PARENTS[-2].palette4[issue], 'cover.gif')"> would be one way to do it. Cheers, Evan @ 4-am (and soon digicool)
participants (2)
-
Evan Simpson -
Kyle Burnett