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.11 -r1.12 --- openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 8 Feb 2003 20:31:36 -0000 1.11 +++ openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 17 May 2003 10:04:18 -0000 1.12 @@ -21,7 +21,7 @@ [list [list url1 text1] [list url2 text2] ... "terminal text"]
     and generates the html fragment.  In general the higher level 
-    calls like ad_context_bar and ad_admin_context_bar should be
+    proc ad_context_bar should be
     used, and then only in the sitewide master rather than on 
     individual pages.
 
@@ -31,7 +31,6 @@
     @return html fragment
 
     @see ad_context_bar
-    @see ad_admin_context_bar
 } { 
     set out {}
     foreach element [lrange $context 0 [expr [llength $context] - 2]] { 
@@ -56,7 +55,8 @@
         # JCD: Provide something for the name if the instance name is
         # absent.  name is the tail bit of the url which seems like a
         # reasonable thing to display.
-        if {[empty_string_p $node(instance_name)]} { 
+        if {[empty_string_p $node(instance_name)]
+            && [info exists node(name)]} { 
             set node(instance_name) $node(name)
         }
 
@@ -73,15 +73,14 @@
     -separator
     args
 } {
-    Returns a Yahoo-style hierarchical navbar. Includes "Your Workspace" or "Administration"
+    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 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
     
     @see ad_context_bar_html
-    @see ad_admin_context_bar
 } {
     if {![parameter::get -package_id [site_node_closest_ancestor_package "acs-subsite"] -parameter ShowContextBarP -default 1]} {
 	return ""
@@ -93,11 +92,6 @@
 
     set context [list]
 
-    if {[ad_conn user_id] != 0 && ![string match /pvt/home* [ad_conn url]]} {
-        lappend context [list "[ad_pvt_home]" "[ad_pvt_home_name]"]
-    }
-
-
     set context [concat $context [ad_context_node_list $node_id]]
 
     if { [string match admin/* [ad_conn extra_url]] } {
@@ -119,74 +113,53 @@
 
 
 
-# a context bar, rooted at the workspace
-
 ad_proc -deprecated -public ad_context_bar_ws args {
-    Returns a Yahoo-style hierarchical navbar, starting with a link to workspace.
+    Returns a Yahoo-style hierarchical navbar. Use ad_context_bar instead.
 
     @param list of url desc ([list [list url desc] [list url desc] ... "terminal"])
     @return an html fragment generated by ad_context_bar_html
 
     @see ad_context_bar
 } {
-    return [ad_context_bar_html [concat [list [list "[ad_pvt_home]" "[ad_pvt_home_name]"]] $args]]
+    return [ad_context_bar $args]
 }
 
 # a context bar, rooted at the workspace or index, depending on whether
 # user is logged in
 
 ad_proc -deprecated -public ad_context_bar_ws_or_index args {
-    Returns a Yahoo-style hierarchical navbar, starting with a link to
-    either the workspace or /, depending on whether or not the user is
-    logged in.  You should probably be using ad_context_bar and 
-    then only in the sitewide master.
+    Returns a Yahoo-style hierarchical navbar. Use ad_context_bar instead.
 
     @param args list of url desc ([list [list url desc] [list url desc] ... "terminal"])
-    @return an html fragment generated by ad_context_bar_html
+    @return an html fragment generated by ad_context_bar
 
     @see ad_context_bar
 } {
-    if { [ad_conn user_id] == 0 && ![string match /pvt/home* [ad_conn url]] } { 
-	set choices [list [list "/" [ad_system_name]]]
-    } else {
-	set choices [list [list [ad_pvt_home] [ad_pvt_home_name]]]
-    }
-
-    return [ad_context_bar_html [concat $choices $args]]
+    return [ad_context_bar $args]
 }
 
-ad_proc -public ad_admin_context_bar args { 
-    Returns a Yahoo-style hierarchical navbar, starting with links
-    workspace and admin home.
-    Suitable for use in pages underneath /admin.
+ad_proc -public -deprecated ad_admin_context_bar args { 
+    Returns a Yahoo-style hierarchical navbar. Use ad_context_bar instead.
 
     @param args list of url desc ([list [list url desc] [list url desc] ... "terminal"])
-    @return an html fragment generated by ad_context_bar_html
+    @return an html fragment generated by ad_context_bar
 
     @see ad_context_bar
 } {
-
-    if { [llength $args] > 0 } { 
-        set choices [list [list [ad_pvt_home] [ad_pvt_home_name]] \
-                         [list /acs-admin/ "ACS System Wide Administration"]]
-    } else { 
-        set choices [list [list [ad_pvt_home] [ad_pvt_home_name]] \
-                         "ACS System Wide Administration"]
-    }
-
-    return [ad_context_bar_html [concat $choices $args]]
+    return [ad_context_bar $args]
 }
 
 ad_proc -public ad_navbar args {
     produces navigation bar. notice that navigation bar is different
-    than context bar, which exploits a tree structure. navbar will just
-    display a list of nicely formatted links.
+    than context bar, which displays packages in the site map. Navbar will
+    only generate HTML for those links passed to it.
 
     @param args list of url desc ([list [list url desc] [list url desc]])
 
     @return html fragment
 
     @see ad_choice_bar
+    @see ad_context_bar_html
 } {
     set counter 0
     foreach arg $args {