[ZPT] syntax of conditions?

Janko Hauser jh@comunit.de
Wed, 10 Apr 2002 09:23:16 +0200


On Tue, 09 Apr 2002 19:39:29 -0400
"Call Me Audrey" <callmeaudrey@hotmail.com> wrote:

> getting the hang of basic ZPT, thanks list. question: how do i
> restrict to a) a specific directory and b) a specific mime type such
> as 'Kube'?
> 
> I can get tal:repeat="item container/objectValues" to work, yay. now
> I want to place restrictions such that only images or kubes or a
> certain directory gets listed.
> 
> below is the basic code. i tried things like tal:condition="item 
> container/objectValues['Kube']" or placing a Python script named
> 'item' in the same directory whose only line is:
> return container.objectValues(['Kube'])
> 
I would suggest o use
<div tal:repeat="item python:container.objectValues(['Kube'])"></div>

HTH
__Janko