ad_context_bar_multirow (public)

 ad_context_bar_multirow [ -from_node from_node ] [ -node_id node_id ] \
    [ -multirow multirow ] context

Defined in packages/acs-tcl/tcl/navigation-procs.tcl

Returns a Yahoo-style hierarchical navbar. Includes "Administration" if applicable, and the subsite if not global.

Switches:
-from_node (optional)
If provided do not generate links to the given node and above.
-node_id (optional)
If provided work up from this node, otherwise the current node
-multirow (optional, defaults to "context")
Parameters:
context (required)
Returns:
an HTML fragment generated by ad_context_bar_html
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_context_bar_multirow ad_context_bar_multirow (test acs-tcl) ad_context_bar_multirow ad_context_bar_multirow test_ad_context_bar_multirow->ad_context_bar_multirow _ _ (public) ad_context_bar_multirow->_ ad_conn ad_conn (public) ad_context_bar_multirow->ad_conn ad_context_node_list ad_context_node_list (public) ad_context_bar_multirow->ad_context_node_list parameter::get parameter::get (public) ad_context_bar_multirow->parameter::get site_node::get_url site_node::get_url (public) ad_context_bar_multirow->site_node::get_url packages/acs-subsite/www/group-master.tcl packages/acs-subsite/ www/group-master.tcl packages/acs-subsite/www/group-master.tcl->ad_context_bar_multirow packages/openacs-default-theme/lib/plain-master.tcl packages/openacs-default-theme/ lib/plain-master.tcl packages/openacs-default-theme/lib/plain-master.tcl->ad_context_bar_multirow packages/openacs-default-theme/lib/plain-streaming-head.tcl packages/openacs-default-theme/ lib/plain-streaming-head.tcl packages/openacs-default-theme/lib/plain-streaming-head.tcl->ad_context_bar_multirow

Testcases:
ad_context_bar_multirow
Source code:
    if {![parameter::get -package_id [ad_conn subsite_id] -parameter ShowContextBarP -default 1]} {
        return ""
    }

    if { $node_id eq "" } {
        set node_id [ad_conn node_id]
    }

    set temp_node_id [util_current_location_node_id]
    if { $temp_node_id eq "" } {
        # not a site host_node
        set node_id_url ""
        set node_id_url_end 0
    } else {
        set from_node $temp_node_id
        set node_id_url [site_node::get_url -node_id ${temp_node_id} -notrailing]
        set node_id_url_end [string length $node_id_url]
    }

    template::multirow create $multirow url label

    foreach elm [ad_context_node_list -from_node $from_node $node_id] {
        lassign $elm elm_0 elm_1
        if { $node_id_url_end > 0
             && [string match -nocase $node_id_url [string range $elm_0 0 $node_id_url_end-1] ]
         } {
            set elm_0 [string range $elm_0 $node_id_url_end end]
        }
        template::multirow append $multirow $elm_0 $elm_1
    }

    if { [string match "admin/*" [ad_conn extra_url]] } {
        template::multirow append $multirow  "[ad_conn package_url]admin/"  [expr {[ad_conn package_key] ne "acs-subsite"
                   ? [_ acs-tcl.Administration]
                   : [_ acs-subsite.Administration]}]
    }

    if { [llength $context] == 0 } {
        # fix last element to just be literal string
        template::multirow set $multirow [template::multirow size $multirow] url {}
    } else {
        foreach elm [lrange $context 0 end-1] {
            template::multirow append $multirow [lindex $elm 0] [lindex $elm 1]
        }
        template::multirow append $multirow {} [lindex $context end]
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: