[Zope] zubb context of _[id]

Dieter Maurer dieter@handshake.de
Thu, 22 Aug 2002 22:57:31 +0200


Bryan C. Andregg writes:
 > I'm converting the main ZUBB index_html to be a Page Template instead of dtml
 > and mostly everything work. Where is breaks is in a few calls like,
 > 
 > <dtml-var "_[id].threadMessageCount()">
 > 
 > For the life of me I cannot figure out what the context of this is in order to
 > convert it.
 > 
 > We're in a <dtml-in> body, and I have the tal:repeat working fine, but nothing
 > like,
 > 
 > tal:replace="container/item/threadMessageCount"
 > 
 > works, always failing with getattr because I have the context wrong.
 > 
 > What is the context of the _[id]
I do not know ZUBB.

  But almost usely, "id" is an attribute of the iteration variable.
  And the result is almost surely to be interpreted with respect
  to "here".

If your iteration variable is "item", I would expect you can use:

   tal:define"id	item/id;
              thread	here/?id;
	      count	thread/threadMessageCount;
	      "


Dieter