Hi, I just ran into something which might be a surprising side effect of dtml-if - well, for me at least. Tried it on two different zope 2.3.3 installs. Here's the problem dtml-method foo should be changed, but it might not exist, so we test it <dtml-if foo> <dtml-call "foo.manage_edit('bar','')"> </dtml-if> Surprisingly this gives the following error Error Type: AttributeError Error Value: 'string' object has no attribute 'manage_edit' Without the dtml-if block it certainly works. title_or_id and other things also won't work. Where does this string object named foo come from? PS: Yes, I know that there are other ways to do the above. cheers, oliver
Oliver Bleutgen writes:
I just ran into something which might be a surprising side effect of dtml-if - well, for me at least. Tried it on two different zope 2.3.3 installs.
Here's the problem
dtml-method foo should be changed, but it might not exist, so we test it
<dtml-if foo> <dtml-call "foo.manage_edit('bar','')"> </dtml-if>
Surprisingly this gives the following error Error Type: AttributeError Error Value: 'string' object has no attribute 'manage_edit' You find an explanation in
<http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> -> DTML -> If. Dieter
participants (2)
-
Dieter Maurer -
Oliver Bleutgen