ad_context_bar (public)
ad_context_bar [ -from_node from_node ] [ -node_id node_id ] \ [ -separator separator ] [ args... ]
Defined in packages/acs-tcl/tcl/navigation-procs.tcl
Returns a Yahoo-style hierarchical navbar. Includes "Administration" or "Subsite Administration" if applicable, and the subsite if not global. 'args' can be either one or more lists, or a simple string.
- 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
- -separator (optional)
- The text placed between each link (passed to ad_context_bar_html if provided)
- Returns:
- an HTML fragment generated by ad_context_bar_html
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- ad_context_bar
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] } # # Get context info for this node. In case of "early" errors # (e.g. invalid characters in the URL), the result might be empty. # set context [ad_context_node_list -from_node $from_node $node_id] if { [string match "admin/*" [ad_conn extra_url]] } { lappend context [list "[ad_conn package_url]admin/" [expr {[ad_conn package_key] ne "acs-subsite" ? [_ acs-tcl.Administration] : [_ acs-subsite.Administration]}]] } if {[llength $args] == 0} { # # Fix last element to just be literal string # if {$context ne ""} { lset context end [lindex $context end 1] } } else { if {![string match "\{*" $args]} { # args is not a list, transform it into one. set args [list $args] } } lappend context {*}$args if { [info exists separator] } { return [ad_context_bar_html -separator $separator $context] } else { return [ad_context_bar_html $context] }XQL Not present: Generic, PostgreSQL, Oracle