[Zope] opening a dtml-tree to a specific node

Mitchell L Model mlm@acm.org
Sat, 22 Sep 2001 12:40:38 -0400


--============_-1210945652==_ma============
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

Has anyone worked out how to open a dtml-tree to a specific node?  I 
see what needs to be done but was hoping someone had already made it 
work.

Part 1: Change tree display to a specific state.

Construct a cookie representing the desired state, using either 
TreeTag.encode_seq or TreeTag.encode_str

With my "tree" frame as a target, display the frame's usual URL, with 
a ?state-s argument equal to the constructed cookie.

Part 2:

Simulate the clicking of the desired link by displaying its URL with 
my "content" frame as a target.

In my case, I actually don't want to specify the entire state of the 
tree, just make sure that a desired node is visible, so I may have to 
use a variation that uses ?state-e instead of ?state-s.
-- 

     --- Mitchell
--============_-1210945652==_ma============
Content-Type: text/html; charset="us-ascii"

<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>opening a dtml-tree to a specific
node</title></head><body>
<div>Has anyone worked out how to open a dtml-tree to a specific
node?&nbsp; I see what needs to be done but was hoping someone had
already made it work.</div>
<div><br></div>
<div>Part 1: Change tree display to a specific state.</div>
<div><br></div>
<blockquote>Construct a cookie representing the desired state, using
either TreeTag.encode_seq or TreeTag.encode_str</blockquote>
<blockquote><br></blockquote>
<blockquote>With my &quot;tree&quot; frame as a target, display the
frame's usual URL, with a ?state-s argument equal to the constructed
cookie.</blockquote>
<blockquote><br></blockquote>
<div>Part 2:</div>
<blockquote><br></blockquote>
<blockquote>Simulate the clicking of the desired link by displaying
its URL with my &quot;content&quot; frame as a target.</blockquote>
<blockquote><br></blockquote>
<div>In my case, I actually don't want to specify the entire state of
the tree, just make sure that a desired node is visible, so I may have
to use a variation that uses ?state-e instead of ?state-s.</div>
<div><tt>-- </tt></div>
<div><br>
&nbsp;&nbsp;&nbsp; --- Mitchell</div>
</body>
</html>
--============_-1210945652==_ma============--