[Zope] Here's how to call a method with a known location from anywhere in the site tree.

Dieter Maurer dieter@handshake.de
Sun, 9 Feb 2003 20:30:13 +0100


Sungmook Kim wrote at 2003-2-9 00:19 +0100:
 > yep, it's a method.
 > but within the folder guestbook, i call this method
 > as <dtml-var addEntryAction> and it works.
 > whereas the addEntryAction calls
 > <dtml-call expr="addEntry(arg1, arg2,...)">
 > 
 > i thought this should work in another folder
 > X too by writing
 > <dtml-var
 > "PARENTS[-1].GuestBook.addEntry(arg1,arg2,...)">
 > 
 > should it not?

Unless "addEntry" is a DTML object.

  If it is, two positional parameters ("client" and "REQUEST")
  are usually mandatory.

More info in the section "Calling DTML objects" of

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>



Dieter