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:
node_id
Options:
-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):
%3 test_web_forum_edit web_forum_edit (test forums) ad_context_node_list ad_context_node_list test_web_forum_edit->ad_context_node_list test_web_forum_view web_forum_view (test forums) test_web_forum_view->ad_context_node_list test_web_forums_message_and_reply web_forums_message_and_reply (test forums) test_web_forums_message_and_reply->ad_context_node_list site_node::get site_node::get (public) ad_context_node_list->site_node::get ad_context_bar ad_context_bar (public) ad_context_bar->ad_context_node_list ad_context_bar_multirow ad_context_bar_multirow (public) ad_context_bar_multirow->ad_context_node_list

Testcases:
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 $context
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: