ad_context_node_list (public)
ad_context_node_list [ -from_node from_node ] node_id
Defined in packages/acs-tcl/tcl/navigation-procs.tcl
Starting with the given node_id, return a list of [list url instance_name] items for parent nodes.
- Switches:
- -from_node (optional)
- Parameters:
- Options:
- node_id (required)
- -from_node
- The top-most node_id for which we'll show context bar. This can be used with the node_id of the nearest subsite to get the context-bar only up to the nearest subsite.
- Author:
- Peter Marklund
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- webtest_example, web_forum_view, web_forum_edit, web_forums_message_and_reply
Source code: set context [list] while { $node_id ne "" } { array set node [site_node::get -node_id $node_id] # 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 {$node(instance_name) eq "" && [info exists node(name)]} { set node(instance_name) $node(name) } # Don't collect link for nodes without an object underneath # (e.g. empty site folders), as they would just be dead links if {$node(object_id) ne ""} { set context [list [list $node(url) $node(instance_name)] {*}$context] } # We have the break here, so that 'from_node' itself is included if {$node_id eq $from_node} { break } set node_id $node(parent_id) } return $contextXQL Not present: Generic, PostgreSQL, Oracle