[Zope] A very newbie question

2000-08-13 Thread Indra Gunawan

I need to know the value of (sequence-index mod 3)=0
in something like
dtml-if "sequence-index mod 3)=0"
how do I use the mod function correctly? since the divmod function is
actualy returning 2 pair of value.
Thanks guys.

-IGUN-
ICQ:1474584


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] A very newbie question

2000-08-13 Thread Terry Kerr


dtml-if "_['sequence-index']%3 ==0"


Indra Gunawan wrote:

 I need to know the value of (sequence-index mod 3)=0
 in something like
 dtml-if "sequence-index mod 3)=0"
 how do I use the mod function correctly? since the divmod function is
 actualy returning 2 pair of value.
 Thanks guys.

 -IGUN-
 ICQ:1474584

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

--
Terry Kerr ([EMAIL PROTECTED])
Adroit Internet Solutions Pty Ltd (www.adroit.net)
Phone:   +613 9563 4461
Fax: +613 9563 3856
Mobile:  +61 414 938 124
ICQ: 79303381




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] A very newbie question

2000-08-13 Thread Phil Harris

Indra,

Try:

dtml-if "_.divmod(_.int(_['sequence-item']),3)[0]==0"

hth

Phil
[EMAIL PROTECTED]


- Original Message - 
From: "Indra Gunawan" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 14, 2000 2:38 AM
Subject: [Zope] A very newbie question


 I need to know the value of (sequence-index mod 3)=0
 in something like
 dtml-if "sequence-index mod 3)=0"
 how do I use the mod function correctly? since the divmod function is
 actualy returning 2 pair of value.
 Thanks guys.
 
 -IGUN-
 ICQ:1474584
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] A very newbie question

2000-08-13 Thread Phil Harris

oops,

Should hae been:

dtml-if "_.divmod(_.int(_['sequence-item']),3)[1]==0"

hth

Phil
[EMAIL PROTECTED]

- Original Message - 
From: "Indra Gunawan" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 14, 2000 2:38 AM
Subject: [Zope] A very newbie question


 I need to know the value of (sequence-index mod 3)=0
 in something like
 dtml-if "sequence-index mod 3)=0"
 how do I use the mod function correctly? since the divmod function is
 actualy returning 2 pair of value.
 Thanks guys.
 
 -IGUN-
 ICQ:1474584
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )