site_node::closest_ancestor_package (public)

 site_node::closest_ancestor_package [ -url url ] [ -node_id node_id ] \
    [ -package_key package_key ] [ -include_self ] \
    [ -element element ]

Defined in packages/acs-tcl/tcl/site-nodes-procs.tcl

Starting with the node of the given id, or at given url, climb up the site map and return the id of the first not-null mounted object. If no ancestor object is found the empty string is returned. Will ignore itself and only return true ancestors unless include_self is set.

Switches:
-url (optional)
The url of the node to start from. You must provide either url or node_id. An empty url is taken to mean the main site.
-node_id (optional)
The id of the node to start from. Takes precedence over any provided url.
-package_key (optional)
Restrict search to objects of this package type. You may supply a list of package_keys.
-include_self (boolean) (optional)
Return the package_id at the passed-in node if it is of the desired package_key. Ignored if package_key is empty.
-element (defaults to "object_id") (optional)
Returns:
The id of the first object found and an empty string if no object is found. Throws an error if no node with given url can be found.
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 test_site_node_closest_ancestor_package site_node_closest_ancestor_package (test acs-tcl) site_node::closest_ancestor_package site_node::closest_ancestor_package test_site_node_closest_ancestor_package->site_node::closest_ancestor_package ad_conn ad_conn (public) ad_conn->site_node::closest_ancestor_package dir_navbar_list dir_navbar_list (public) dir_navbar_list->site_node::closest_ancestor_package packages/acs-subsite/www/admin/plain-master.tcl packages/acs-subsite/ www/admin/plain-master.tcl packages/acs-subsite/www/admin/plain-master.tcl->site_node::closest_ancestor_package packages/acs-subsite/www/admin/site-map/instance-delete.tcl packages/acs-subsite/ www/admin/site-map/instance-delete.tcl packages/acs-subsite/www/admin/site-map/instance-delete.tcl->site_node::closest_ancestor_package packages/acs-subsite/www/group-master.tcl packages/acs-subsite/ www/group-master.tcl packages/acs-subsite/www/group-master.tcl->site_node::closest_ancestor_package

Testcases:
site_node_closest_ancestor_package
[ show source ]
Show another procedure: