Re: [Zope] newbie tree q - how collapse and expand
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
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 )
Usin tree-s/c/e is going to be a bit problematic. In my understanding those vars are built from the context of the node in the tree, so if you add/remove anything to/from the tree then the tree-s/c/e will change. There doesn't seem to be anyway of going to a particular point in a tree with any certainty. I did this on one site for example, it's a prospectus for a college, the tree is built from calls to a sql database. Adding or removing records from this database totally changed the tree-s/c/e vars that each node is associated with. I hope I'm wrong about that but I have a horrible feeling that I'm right. Please someone prove me wrong. Phil phil.harris@zope.co.uk ----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Zope Mailing List" <zope@zope.org> Sent: Thursday, March 09, 2000 11:52 AM Subject: Re: [Zope] newbie tree q - how collapse and expand
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 )
_______________________________________________ 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 )
participants (3)
-
Chris Withers -
Petr Knapek -
Phil Harris