[Zope] Difference between manage_addProperty on a DTMLDocument and on a Folder

Tres Seaver tseaver@palladion.com
Mon, 07 Feb 2000 16:41:23 -0600


"Benillouche, Michael" <Michael.Benillouche@france.acnielsen.com>

> I have the following problem :
> 
> When I execute this code :
> 
> <dtml-call "REQUEST.set('compteur_login', _.str(compteur) )">
> <dtml-call "manage_addFolder(id=compteur_login)">
> <dtml-call "_[compteur_login].manage_addProperty('type', 'FC', 'string')">
> 
> The Folder  is created  with the property 'type'
> 
> But when I execute this code :
> 
> <dtml-call "REQUEST.set('compteur_login', _.str(compteur) )">
> <dtml-call "manage_addDTMLDocument(id=compteur_login)">
> <dtml-call "_[compteur_login].manage_addProperty('type', 'FC', 'string')">
> 
> I have the following error :
> 
> Error Type: AttributeError
> Error Value: 'string' object has no attribute 'manage_addProperty'
> 
> It seems that manage_addProperty doesn't behave the same way on a Folder and
> a DTMLDocument .
> Any solution to make it work ?
> Thanks a lot.

The "_[compteur_login]" is causing the document to be rendered, I think.  Try::

  <dtml-with compteur_login>
     <dtml-call "manage_addProperty('type', 'FC', 'string')">
  </dtml-with>



-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com