[Zope] Mixing ZPT and DTML in CMF
Dieter Maurer
dieter@handshake.de
Sun, 21 Apr 2002 21:41:06 +0200
Heimo Laukkanen writes:
> ....
> <dtml-let osoite1="portal_url" path="_.str(osoite1)+'/'" >
>
> Which makes no sense, since osoite1 will be an istance or URLTool.
The problem will go away, when you use
<dtml-let
osite1=portal_url
path="osoite1+'/'"
>
"portal_url" is an object without custom "__str__" method, therefore
"str(portal_url)" results in "<URL Tool instance ...>".
However, "portal_url" is designed to be called to return the URL.
As using "portal_url" as a DTML name rather than an expression
(that's what the missing "..." above mean) entails calling (if
possible) you get assign the URL and not the object.
Dieter