On Saturday 10 March 2001 08:05, Edmund Goppelt wrote:
If I want to call another DTML method from within a DTML method, I use the following Zope idiom:
My_dtml_method
<dtml var fjdkjfkd> higherup.folder.other_dtml_method(_.None, _) .....
The docs says arg #1 is the client object I want the function to act on and arg #2 a mapping like the REQUEST object. So if I want the function to act on my DTML object why the _.None idiom? Why not refer explicitly to my DTML object by using 'this' or PARENTS[0]?
if your 'dtml object' is a method the client is its container, and most of the time you want whatever object your calling to act on that container which is achieved by leaving client as None, (i believe in zope source lingo its called calling a sub template). a common exception, if you have a dtml method in one folder which wants to add objects to another folder than you change the clients from _.None to the folder you want to act on. cheers kapil