[ZPT] Error using tree-example

Gitte Wange gitte@mmmanager.org
Mon, 3 Feb 2003 14:13:39 +0100


On Monday 03 February 2003 01:44 pm, Gitte Wange wrote:
> Hello,
>
> I have tried to create a tree-view.
> I looked at the zpt-examples and tried to use the tree-example at my cm=
f
> site. (I could see the example without any errors).

[SNIP Error message]

Well I tried closing my browser and open it again and then it worked. May=
be
some cookie problems ??

Anyways ... I want to create a tree-view of all portal folders in a cmf-s=
ite,
but giving the portal root object I get no rows :-(
What do I need to do in order to display sub folders ?

Here's my script (taking from the examples) that gets the tree:
from ZTUtils import SimpleTreeMaker

tm =3D SimpleTreeMaker(tree_pre)
tm.setSkip('')
tree, rows =3D tm.cookieTree(tree_root)
rows.pop(0)
return {'root': tree, 'rows': rows}

--
Gitte Wange
Technical Manager

Email: gitte@mmmanager.org
Web: http://www.mmmanager.org
Tlf: +45 36 46 20 02

I'd use a list comprehension instead of a map(lambda...)
if I thought it would get past Jim

    -- Steve Alexander: Zope-Dev mailing list
       In a patch for ZCatalog.