Equivalent of dtml-with in script or ZPT?
Is there a way to achieve in a Python script an effect equivalent to <dtml-with an_object> operations in context of an_object </dtml-with> ? I know it's possible to call the object's methods, but if I need to pass the methods a context (for example to render a DTML method), I get the context of the object calling the script, not the context of an_object. And, for that matter, is there a way to achieve the same effect in a TALES expression? Thanks for all feedback! -- ______________________________________________________ Steve McMahon Reid-McMahon, LLC
Steve McMahon wrote at 2003-3-8 17:09 -0800:
Is there a way to achieve in a Python script an effect equivalent to
<dtml-with an_object> operations in context of an_object </dtml-with>
There is not equivalent to "dtml-with". You must do it explicitly.
? I know it's possible to call the object's methods, but if I need to pass the methods a context (for example to render a DTML method), I get the context of the object calling the script, not the context of an_object.
Example: dtmlMethod= an_object.method dtmlMethod(an_object, an_object.REQUEST)
And, for that matter, is there a way to achieve the same effect in a TALES expression?
Same way.... Dieter
participants (2)
-
Dieter Maurer -
Steve McMahon