[Zope3-Users] Access subfolder's files object's metadata thru tal macros

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Jun 1 16:17:26 EDT 2006


On Tuesday 25 April 2006 01:19, Nicolas Legault wrote:
> <div tal:repeat="item context/a_folder">
>   file:<p tal:replace="item">filename</p><BR> <!-- This line work correctly
> -->
>   desc:<p tal:replace="item/zope:description">description</p><BR> <!-- this
> line create a system error -->
> </div>
>
> Is there someone who can tell me the correct way to do this ?

When you iterate over a dictionary/mapping such as a folder, you iterate over 
its keys, not its values. Thus, item is just a string, which clearly does not 
have a description. You could alternatively iterate over "folder/values".

Having said that, I would strongly you to use view classes instead of TTW 
development, which is not supported at this point.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-users mailing list