[Zope] Namespace + syntax question

Kevin Dangoor kid@kendermedia.com
Tue, 15 Feb 2000 11:40:45 -0500


----- Original Message -----
From: "RC Compaan" <roche@up-front.co.za>
To: "Zope" <zope@zope.org>
Cc: "Kevin Dangoor" <kid@kendermedia.com>; <jsanford@atinudeus.com>;
<tseaver@palladion.com>
Sent: Tuesday, February 15, 2000 11:25 AM
Subject: RE: [Zope] Namespace + syntax question


> I modified it like so:
>   <dtml-if "_.fmod(_['sequence-index'],10)==0">
>      </tr>
>      <tr><td><dtml-var sequence-item></td>
>   <dtml-else>
>      <td><dtml-var sequence-item></td>
>   </dtml-if>
>
> Now i get:
>  Error Type: AttributeError
>  Error value: fmod
>
> i'm lost.  is this the right approach or is there another way?

fmod is actually in the math module, so you need to do:

<dtml-if "_.math.fmod(_['sequence-index'],10)==0">

I think this method should work.

Kevin