[Zope] boolean dtml solution!

Michael Gutmann gutmann@uni-duesseldorf.de
Wed, 04 Jul 2001 11:10:54 +0200


Just for completeness, I stumbled over this yesterday too.
A solution for your problem is to find out first, if your
object has the property index_hide, and then find out, if it's set:

<dtml-in expr="objectValues()" sort="bobobase_modification_time" reverse>
<dtml-if "hasProperty('index_hide')">
<dtml-comment>here we print it only, if index_hide is there but not set</dtml-comment>
<dtml-unless index_hide>
<li><a href="<dtml-var absolute_url>"><dtml-var title></a><br>
</dtml-unless>
<dtml-else>
<dtml-comment>here we print it directly, because it hasn't index_hide and
shouldn't acquire one from above</dtml-comment>
<li><a href="<dtml-var absolute_url>"><dtml-var title></a><br>
</dtml-if>
</dtml-in>

Leigh Ann Hildebrand wrote:

<...> 
> "Ok, my *guess* is that your problem arose from the fact that your
> index_html seems to be a DTML Document, since it has a property
> foldername.  I'm guessing that when you tried the index_hide property
> experiment you naturally set index_hide on the index_html.  But since
> it is a Document, anything called inside it acquires from it,
> so the hidden property got acquired."
<...>

> Leigh Ann
> 


Hope this helps somebody,
Michael

-- 
Michael Gutmann M.A.
gutmann@uni-duesseldorf.de
Multimediazentrum Heinrich-Heine-Universitaet Duesseldorf