[Zope] highlighting selected node of a dtml-tree

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Sun, 23 Sep 2001 11:31:47 +1000


I've tried to do this with dtml-tree - the old www.ekit.com/www.ekno.com
site uses it. I gave up - if you really want something like this, I recommend
writing it from scratch yourself. dtml-tree's innards are 
<gollum>nassssty</gollum>.

fwiw, the newer www.ekit.com site uses our own sort-of tree implementation,
while www.ekno.com is still on the old dtml-tree implementation. I'd consider
releasing the code, but it's so ridiculously specialised for what we need
to do that it's almost certainly not worth it.

Anthony

>>> Mitchell L Model wrote
> Has anyone worked out a way to highlight the selected node of a 
> dtml-tree?  Since trees are used as navigation mechanisms, it seems 
> appropriate that clicking an item should highlight it (change it's 
> background, make it bold -- whatever) and dehighlight the previous 
> "selection".
> 
> I've done this with JavaScript (and seen various JavaScript tree 
> widgets that do this), but since dtml-tree doesn't use JavaScript, it 
> might have to regenerate the whole tree display on each click and 
> generate something different for the node just clicked.  This gets 
> tricky, since the usual behavior for clicking is to affect the 
> display in another frame, not do something to the tree itself. 
> Another possibility would be to add onclick JavaScript to each node's 
> <a> tag that does something to highlight that node; presumably this 
> would require adding a unique HTML name/id to each node's <a> or <td> 
> tag so the JavaScript could refer to it.  Etc.
> 
> _______________________________________________
> 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 )
> 

-- 
Anthony Baxter     <anthony@interlink.com.au>   
It's never too late to have a happy childhood.