How do I exclude a specific item from a tal:repeat
How do I exclude a particular item from being returned from the following statement. I have a file i use with a particular name and I don't want it to show up in my listing... tal:repeat="obj python:here.getFolderContents(suppressHiddenFiles=1)" Any suggestions are gratefully accepted! Jordan Carswell, Web Graphic Designer Houston Community College-Northwest
Jordan Carswell wrote:
How do I exclude a particular item from being returned from the following statement. I have a file i use with a particular name and I don't want it to show up in my listing...
tal:repeat="obj python:here.getFolderContents(suppressHiddenFiles=1)"
<div tal:condition="python:obj.Name() != 'unwanted_name'"></div> regards Max M
How do I exclude a particular item from being returned from the following statement. I have a file i use with a particular name and I don't want it to show up in my listing...
tal:repeat="obj python:here.getFolderContents(suppressHiddenFiles=1)"
tal.repeat="obj python:filter(lambda item:not (item.getId()=='unwanted_file'),here.getFolderContents(suppressHiddenFiles=1));
participants (3)
-
Jordan Carswell -
Max M -
Sergey Volobuev