I'm trying to use zpt to render a nested list and I found an example in the mail list of zope,
['a', 'b', ['c', ['d', 'e']]] the corresponding zpt code, <ul tal:define="nodes python:['a', 'b', ['c', ['d', 'e']]]"> <li metal:define-macro="item" tal:repeat="node nodes"> <span tal:define="global is_list python:same_type([], node); content python:is_list and 'list:' or node" tal:replace="content"/> <ul tal:condition="is_list" tal:define="nodes node"> <li metal:use-macro="template/macros/item"/> </ul> </li> </ul> The python:same_type() didn't work here, so I replaced it with isinstance(node,list). However, I got the output like the following: - a - b - list: - c - list: - d - e - d - e - c - list: - d - e - d - e does any body know what is the problem here?
_______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev