[Zope] DTML type casting? or something? / LocalFS subdirectory exists test

davis marques davismarques169@hotmail.com
Tue, 23 Apr 2002 14:22:17 -0700


I'm having a DTML problem here.  I'm trying to test whether a subdirectory 
(whose id=ProjectID) exists under a LocalFS object.

<dtml-with ProjectID>
      <dtml-if "'&dtml-ProjectID;' in projectfiles.fileIds()">
            The directory "<dtml-var ProjectID>" exists
      <dtml-else>
            "<dtml-var ProjectID>" does not exist
      </dtml-if>
</dtml-with>

When I manually enter a value in place of ProjectID it works fine (ex. 
"'202006' in projectfiles.filesIds()").  When I use &dtml-ProjectID; it 
doesn't work.  I presume that the value of ProjectID is not being translated 
into an appropriate format for the expression to work, but I don't know how 
to test this or to resolve this.  Any thoughts?  Better ways to do this?

thanks


Davis

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.