[Zope] changing the default index_html
Rik Hoekstra
RikHoekstra@bigfoot.com
Tue, 14 Dec 1999 11:12:09 +0100
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Maarten Slaets
> Sent: Tuesday, December 14, 1999 10:58 AM
> To: zope@zope.org
> Subject: [Zope] changing the default index_html
>
>
> How do I do this?
>
> (I want to put in something like:
> <ul>
> <dtml-in "PARENTS[0].objectValues()">
> <dtml-if expr="id=='index_html'">
> <dtml-else>
> <li><a href="<dtml-var absolute_url>"><dtml-var id></a></li>
> </dtml-if>
> <dtml-else>
> Nothing in folder.
> </dtml-in>
> </ul>
> )
>
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>
(If no objectValues display 'Nothing in folder' else only shows all
objectValues except index_html)
Or do you want something else?
Rik