Index: openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 17 May 2003 10:04:18 -0000 1.12 +++ openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 14 Aug 2003 19:34:45 -0000 1.13 @@ -41,15 +41,24 @@ return $out } -ad_proc ad_context_node_list { node_id } { +ad_proc ad_context_node_list { + -from_node + node_id +} { Starting with the given node_id, return a list of [list url instance_name] items for parent nodes. + Do not include links to from_node and above, if provided. + @author Peter Marklund } { set context [list] - while { ![empty_string_p $node_id] } { + if { ![info exists from_node] } { + set from_node "" + } + + while { ![empty_string_p $node_id] && ![string match $node_id $from_node] } { array set node [site_node::get -node_id $node_id] # JCD: Provide something for the name if the instance name is @@ -70,13 +79,15 @@ ad_proc -public ad_context_bar { -node_id + -from_node -separator args } { Returns a Yahoo-style hierarchical navbar. Includes "Administration" if applicable, and the subsite if not global. @param node_id If provided work up from this node, otherwise the current node + @param from_node If provided do not generate links to the given node and above. @param separator The text placed between each link (passed to ad_context_bar_html if provided) @return an html fragment generated by ad_context_bar_html @@ -92,8 +103,14 @@ set context [list] - set context [concat $context [ad_context_node_list $node_id]] + if { [info exists from_node] } { + set context [concat $context \ + [ad_context_node_list -from_node $from_node $node_id]] + } else { + set context [concat $context [ad_context_node_list $node_id]] + } + if { [string match admin/* [ad_conn extra_url]] } { lappend context [list "[ad_conn package_url]admin/" \ "Administration"] @@ -205,7 +222,7 @@ proc ad_no_uplevel_patterns {} { set regexp_patterns [list] - lappend regexp_patterns "/pvt/home.tcl" + lappend regexp_patterns "*/pvt/home.tcl" # tcl files in the root directory lappend regexp_patterns "^/\[^/\]*\.tcl\$" lappend regexp_patterns "/admin*"