Index: openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl 21 Jun 2002 19:08:33 -0000 1.5 +++ openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl 3 Jul 2002 22:34:11 -0000 1.6 @@ -98,19 +98,21 @@ # reason, Oracle does not allow level to be selected from an on-the-fly view # containing connect by. However, if you rename the column, Oracle is happy to give # it to you. We could tell you how we figured this out, but then we would have to kill you. - +set open_nodes [list] db_foreach nodes_select {} { - doc_body_append "" - for {set i 0} {$i < 3*$mylevel} {incr i} { - doc_body_append " " - } + if { [lsearch -exact $open_nodes $parent_id] == -1 && $parent_id != "" && $mylevel > 2 } { continue } + doc_body_append "" + for {set i 0} {$i < 3*$mylevel} {incr i} { + doc_body_append " " + } if {!$root_p && $n_children > 0} { set link "+" set urlvars [list] foreach n $expand { if {$n == $node_id} { set link "-" + lappend open_nodes "$node_id" } else { lappend urlvars "expand=$n" }