[Zope] dtml-in and if

James van der Veen james@codenamefuture.nl
Wed, 22 Aug 2001 13:39:01 +0200


Hi everybody..

I have a question...

How should I do the folowing?

I now have this

<dtml-in "objectValues(['Informatie', 'sitenieuws'])" =
start=3Dquery_start
size=3D"6" sort=3Dbobobase_modification_time reverse>
<dtml-if "publish=3D=3D'true'">
<dtml-var title>
</dtml-if>
This means it wil find all the objects if the publish property is true. =

But here is my problem. If if I want 6 of the titles on my frontpage
(size=3D6) it doesn=B4t work because the fist 6 it might find aren=B4t =
publish =3D
true
I guess the thing I would want to do is the above code but than with a =
else
bit that increases the sitze of the query if the publish property =
isn=B4t
true.
I guess it would look like this (tried this but doesn=B4t work)

<dtml-in "objectValues(['Informatie', 'sitenieuws'])" =
start=3Dquery_start
size=3D"6" sort=3Dbobobase_modification_time reverse>
<dtml-if "publish=3D=3D'true'">
<dtml-var title>
<dtml-else>
<dtml-call "REQUEST.set('size', ['size' + '1'])">
</dtml-if>

Any clues on how to do this the right way...??

Hope someone can help me on this one!!

Greetz,
James