[Zope] ZPT list is dead... zpt nav question

bruno modulix bruno at modulix.org
Thu Apr 14 04:29:27 EDT 2005


Norbert Ray-Goldman wrote:
> so I am posting this here. I would like my zpt to list only folders in
> a director - essentially filtering out all other meta_type(s)... can
> you tell me where I am going wrong with the filtering here ?
> 
> 
> ################################################
> 
> <html>
>   <head>
>     <title tal:content="template/title">The title</title>
>   </head>
>   <body>
> <span>
> <a href="HOME_URL" tal:attributes="href container/absolute_url"
>            tal:content="container/title_or_id">TITLE OR ID</a>
> 
> <span tal:repeat="item here/objectValues">

Make it:
<span tal:repeat="item python:here.objectValues('Folder')">

...and remove the test on meta_types.

Or you can also put the filter in a python script, so the template does 
not need to know about that...




-- 
Bruno Desthuilliers
Développeur
bruno at modulix.org


More information about the Zope mailing list