Everytime I think I am beginning to understand I try to do something new and wham! It won't work for me. I have a dtml-document that I have a list of courses for a college program. I would like to list the courses one item at a time checking the 8th character to see if it is a '-' so I know if the line is a comment or a course name. Here is the coding I have done so far and as usual it does not work so any help is appreciated. <dtml-in "_.getitem(ProgCode + 'CL')"> <dtml-var sequence-item> </dtml-in> Terry -- __________________________________________________________________ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __________________________________________________________________
Part of the problem here is that you cannot loop through a string (which is what a DTML Document returns). You can split the string and loop through that or more efficiently create a lines property on an object and loop through that. Something like: property: Course, type: lines <dtml-in Course> <dtml-let item=sequence-item> <dtml-if "item[7] = '-'"> .... </dtml-if> </dtml-let> </dtml-in> ----- Original Message ----- From: "Terry Babbey" <terry@lambton.on.ca> To: <zope@zope.org> Sent: Wednesday, July 19, 2000 7:59 AM Subject: [Zope] Simple DTML-IN question
Everytime I think I am beginning to understand I try to do something new and wham! It won't work for me. I have a dtml-document that I have a list of courses for a college program. I would like to list the courses one item at a time checking the 8th character to see if it is a '-' so I know if the line is a comment or a course name. Here is the coding I have done so far and as usual it does not work so any help is appreciated.
<dtml-in "_.getitem(ProgCode + 'CL')"> <dtml-var sequence-item> </dtml-in>
Terry
-- __________________________________________________________________ Terry Babbey Technical Support Specialist Lambton College, Sarnia, Ontario, Canada __________________________________________________________________
_______________________________________________ Zope maillist - Zope@zope.org 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 )
participants (2)
-
Andy McKay -
Terry Babbey