[Zope] Help with DTML

Tom Wright thomas.wright1@btinternet.com
Sat, 11 Mar 2000 22:08:57 -0000


Hi DTML Gurus,

I am a newbie with DTML and i am trying to do the following with this script

1) using the subdirectory RegisteredUsers, check if a ZClass object of type
Player exists in the RegisteredUsers directory with an id that matches that
in the Request ( a form from the client ). This currently doesnt work for
some reason and i get the else case even if the object does exist.
2) In the else case i am then trying to create a new object of type Player
 a ZClass object defined in the GameSite product ).  I am creating the
object correctly in the correct place but the next bit of setting the
properties of  the player object does not work, and the object properties
are blank.

HELP !!

I have checked all the documentation for zclasses, dtml faq etc.  Can any
one help?

Is  there an easier/better way of achieving what i am trying to do, or am i
barking up the wrong tree ?


<dtml-with RegisteredUsers>

<dtml-if REQUEST['new_user_name']>

User currently exists

<dtml-else>

New user

  <dtml-with "manage_addProduct['GameSite']">

    <dtml-with "Player.createInObjectManager(REQUEST['new_user_name'],
REQUEST)">

      <dtml-call
nage_changeProperties( 
                  user_name   = REQUEST['new_user_name'],
                  password    = REQUEST['new_password'],
                  player_name = REQUEST['new_player_name'],
                  planet_name = REQUEST['new_planet_name'],
                  email       = REQUEST['new_email'],
                 )" > 
                  
    </dtml-with>

  </dtml-with>

</dtml-if>

</dtml-with> 

Regards

Tom Wright
thomas.wright1@btinternet.com