[Zope] conditional dtml-in ?
Thomas B. Passin
tpassin@mitretek.org
Wed, 7 Nov 2001 11:45:08 -0500
I suggest that you use one dtml-in loop to build up a list that contains
only the elements that you want, then do a dtml-in loop on that array.
Cheers,
Tom P
[Ruberl Michele]
If I do
<dtml-if expr="my_attribute == 1">
<dtml-in>
</dtml-in>
</dtml-if>
my_attribute isn't an attribute of each sequence_item
If I do
<dtml-in>
<dtml-if>
</dtml-if>
</dtml-in>
I cannot use the dtml-in modifiers, like start="1", size="10">...
I mean, I can use them but I'd like them to mean "start from position 1 of
the sequence of the items matching the where-like clause" and "take the
first 10 elements of the sequence of the items matching the where-like
clause". Am I wrong?
Michele
> -----Original Message-----
> From: Garry Steedman [mailto:gs@styrax.com]
> Sent: mercoledì 7 novembre 2001 18.28
> To: Ruberl Michele
> Cc: zope@zope.org
> Subject: Re: [Zope] conditional dtml-in ?
>
>
> Michele,
>
> am i missing something, why dont you do
>
> <dtml-if>
> <dtml-in>
> </dtml-in>
> </dtml-if>
>
> or some combination thereof???
>
> cheers,
>
> garry
>
> On 7 Nov 2001, at 17:18, Ruberl Michele wrote:
>
> From: Ruberl Michele <mruberl@etnoteam.it>
> To: "'zope@zope.org'" <zope@zope.org>
> Subject: [Zope] conditional dtml-in ?
> Date sent: Wed, 7 Nov 2001 17:18:03 +0100
>
> > Hi everybody,
> >
> > is there a way of making <dtml-in> loops conditionally?
> >
> > I would need something like <dtml-in expr="objectValues('MyZClass')"
> > where="my_attribute == 1"> Does anybody have a method doing
> this or a
> > way to help me?
> >