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'"> ...
Hi Maarten
This nagged me, so I delved into it a bit more. It did not work as a result of mixing DTML Methods with proper objects. The id of the DTML Method is not a string (apparently), but of other objects it is. Or something like that (I don't really understand this) The resulting code is a bit more complicated than I'd have hoped for (well, it's not _that_ bad), but it works. If someone knows something cleaner - please tell us
<ul> <dtml-if expr="_.len(PARENTS[0].objectItems())==0"> Nothing in folder. <dtml-else> <dtml-with "PARENTS[0]"> <dtml-in objectValues sort=id> <dtml-if "meta_type=='DTML Method'"> <dtml-if expr="id() <> 'index_html'"> <li><a href="<dtml-var absolute_url>"><dtml-var id></a></li> </dtml-if> <dtml-else> <dtml-if expr="id<>'index_html'"> <li><a href="<dtml-var absolute_url>"><dtml-var id></a></li> </dtml-if> </dtml-if> </dtml-in> </dtml-with> </dtml-if> </ul>
Rik
ouch, you've been busy ;-) this is of much help, not in the least educationally! bedankt -- Maarten Slaets Web Developer KPNQwest Belgium http://www.fonky.com/vcard/MaartenSlaets/