[Zope] Beginner DTML question: dereferencing a variable

Martin Dougiamas martin@dougiamas.com
Tue, 06 Apr 1999 15:33:06 +0800


I know the answer to this must be pretty simple, but I can't work
it out from any of the docs and it's driving me nuts.

I have a variable that contains a username:

<!--#call "REQUEST.set('theusername',AUTHENTICATED_USER.getUserName() )"-->

I want to check if a folder of that name already exists 
under the current folder, so I can decide to create it or not.

Intuitively, I first tried:
 
<!--#if "theusername"-->
  <H3>FOLDER EXISTS</H3>
<!--#else-->
  <H3>FOLDER DOES NOT EXIST</H3>
<!--#/if-->

But all this seems to detect is if the variable is set or not.  :(

Other variations are getting me nowhere ... what's missing?

--
Martin Dougiamas