[Zope] <dtml-in> looping over lines in document

Loren Stafford lstafford@morphics.com
Thu, 10 May 2001 15:21:02 -0700


1. A lines property is probably the simplest solution. If your property is
called MyList, then your DTML would be

<dtml-in MyList>
 <dtml-var sequence-item><br>
</dtml-in>

2. Instead of a property, you could use a DTML method that simply returns a
list of precoded values, like this:

<dtml-return "[
'Private',
'Public'
]">

4. There probably is a way to suck the lines of a DTML method out as a list,
but that wouldn't be a straight-forward solution.

5. You could use a TinyTable is the list is more complicated.

-- Loren

> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Laurie Nason
> Sent: Thursday, May 10, 2001 14:25
> To: Zope
> Subject: [Zope] <dtml-in> looping over lines in document
>
>
> Hi guys & gals,
>
> Is it possible to use <dtml-in> over a DTML method's text and get
> each line
> out one by one. I know there is a lines property but am not sure how or if
> it can be used in this context.
>
> The reason I am asking is that I am trying somehow to store my
> lookup values
> for my select boxes in one folder with each lookup having a separate DTML
> method containing the values. If anyone has a better idea, please let me
> know.
>
> Thanks,
> Laurie
>
> Laurie Nason
> Dept. of Biochemistry - N420
> Baylor College of Medicine
> Houston. TX77030
>
>
> _______________________________________________
> 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 )
>