ad_scope_context_bar_ws_or_index argsWhat it does:
if scope is not set in the topmost environment then public scope is assumed. if scope=group, it assumes that group_context_bar_list are set in the topmost environment. returns a Yahoo-style hierarchical contextbar for appropriate scope, starting with a link to either the workspace or /, depending on whether or not the user is logged in.Defined in: /web/philip/tcl/ad-scope.tcl
Source code:
if { [ad_get_user_id] == 0 } { set choices [list "<a href=\"/\">[ad_system_name]</a>"] } else { set choices [list "<a href=\"[ad_pvt_home]\">Your Workspace</a>"] } set all_args [list] if { [uplevel [ad_scope_upvar_level] {info exists scope}] } { upvar [ad_scope_upvar_level] scope scope } else { set scope public } switch $scope { public { set all_args $args } group { upvar [ad_scope_upvar_level] group_vars_set group_vars_set set group_context_bar_list [ns_set get $group_vars_set group_context_bar_list] eval "lappend all_args $group_context_bar_list" foreach arg $args { lappend all_args $arg } } user { # this may be later modified if we allow users to customize the display of their pages set all_args $args } } set index 0 foreach arg $all_args { incr index if { $index == [llength $all_args] } { lappend choices $arg } else { lappend choices "<a href=\"[lindex $arg 0]\">[lindex $arg 1]</a>" } } return [join $choices " : "]