[Zope] newbie tree q - how collapse and expand

Chris Withers chrisw@nipltd.com
Thu, 09 Mar 2000 11:52:54 +0000


expand_all and collapse_all are all very well but I think Andy is after the same
thing that I gave up on. 

How can you expand or collapse a tree to a specific point, ie:

- make a particular subtree expanded 

- make sure a particular node in the tree in visible

The Zope DTML guide mentions the tree-s, tree-e and tree-c variables but it
doesn't explain how to use them. I haven't found any help anywhere on this.

Any ideas?

Chris

Petr Knapek wrote:
> 
> >>>>> On Thu, 9 Mar 2000 09:07:15 -0000, "Phil Harris" <phil.harris@zope.co.uk> said:
> 
>     PH> Andy try something like: <a
>     PH> href="treeview?expand_all=1">expanded</a> <a
>     PH> href="treeview?collapse_all=1">collapsed</a>
> 
> On my Zope, (2.1.4 deb package - on Linux) only collapse_all works. In
> the case of expand_all a key error is raised. I have reported this
> yesterday and also Jason at the same day reported the same bug. Does
> anybody the same problem with tree and expand_all?
> 
>     PH> HTH
> 
>     PH> Phil phil.harris@zope.co.uk
> 
>     PH> ----- Original Message ----- From: "Andy Heath"
>     PH> <a.k.heath@open.ac.uk> To: <zope@zope.org> Sent: Thursday, March
>     PH> 09, 2000 8:38 AM Subject: [Zope] newbie tree q - how collapse
>     PH> and expand
> 
>     >> I'm getting better but stil learning.
>     >>
>     >> I want to collapse/expand a tree at will so that I can come in
>     >> from particular hyperlinks to a known tree state.  I know there
>     >> are two variables I can set but I don't know how to do this from
>     >> code.
>     >>
>     >> For example how could I have a hyperlink whose HREF is a page
>     >> containing a tree in such a way that when you get there the tree
>     >> gets collapsed while another link to the same page doesn't
>     >> collapse it.  Can someone show me some code that dows this
>     >> please.
>     >>
>     >> Andy -- ------------------------------------------------- Andy
>     >> Heath a.k.heath@open.ac.uk The Open University +44 (0) 114
>     >> 2885738
> 
> Petr
> 
> --
> Petr Knápek
> PVT.NET, e-mail: petr.knapek@pvt.net, tel:+420-5-41 558 394
> PVT a.s. - pvt.net, Veveří 102, 659 10 Brno, Czech Republic
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )