[Zope] changing the default index_html

Maarten Slaets maarten.slaets@kpnqwest.com
Tue, 14 Dec 1999 12:15:29 +0100


hi Rik,
> 
> hm, it seems to me the dtml-if is not used properly.
> I'm not sure what you want,though.
> Would the next amended version work?
> 
>  <ul>
>  <dtml-in "PARENTS[0].objectValues()">
>   <dtml-if expr="id=='index_html'">
>    <li><a href="<dtml-var absolute_url>"><dtml-var id></a></li>
>   <dtml-else>
>    Nothing in folder.
>   </dtml-if>
>  </dtml-in>
>  </ul>
> 
> (only shows index_html)
> 
> or this one:
>  <ul>
>   <dtml-if"expr=_.len(PARENTS[0].objectValues()==0">
>     Nothing in folder.
>   <dtml-else>
>    <dtml-in "PARENTS[0].objectValues()">
>      <dtml-if expr="id!='index_html'">
>        <li><a href="<dtml-var absolute_url>"><dtml-var id></a></li>
>      </dtml-if>
>    </dtml-in>
>   </dtml-if>
>  </ul>

yup the above is what I wanted. i have fixed some syntax:
  <ul>
   <dtml-if expr="_.len(PARENTS[0].objectValues())==0">
     Nothing in folder.
   <dtml-else>
    <dtml-in "PARENTS[0].objectValues()">
      <dtml-if expr="id!='index_html'">
        <li><a href="<dtml-var absolute_url>"><dtml-var id></a></li>
      </dtml-if>
    </dtml-in>
   </dtml-if>
  </ul>

but it still shows the index_html. maybe I am comparing a string with an
object in <dtml-if expr="id!='index_html'"> ...

thanks

-- 
Maarten Slaets
Web Developer
KPNQwest Belgium
http://www.fonky.com/vcard/MaartenSlaets/