[ZPT] Accessing Brains Using ZPT

Dieter Maurer dieter at handshake.de
Fri May 28 15:05:13 EDT 2004


Doug Tillman wrote at 2004-5-27 22:07 -0500:
>I'm attempting to use a Brain bound to a ZSQL method.  While I have no
>trouble finding a DTML example of how to access a method of my bound
>class in a loop I can't find a tal:repeat example.  Is this even doable
>with ZPT?
>
>I tried a variety of approaches canibalized from various references.  I
>had great hopes for this one:
><span tal:define="doc nocall:container/cvsusersobj"
>      tal:content="string:${doc/fullName}">Full Name</span>
>
>where cvsuserobj is a DTML method that defined the class fullName
>attribute in a dtml-var.

Help! What are you doing here?

  What does it have to do with a ZSQL Method brain?

You access the method of a brain in exactly the same way
as you access any method. E.g.:

   <XXX tal:repeat="brain ZSQL">
     <YYY tal:content="brain/method1" />
     <YYY tal:content="python: brain.method2(...)" />
   </XXX>

-- 
Dieter



More information about the ZPT mailing list