site_node_closest_ancestor_package (public, deprecated)
site_node_closest_ancestor_package [ -default default ] [ -url url ] \
package_keysDefined in packages/acs-tcl/tcl/deprecated-procs.tcl
Deprecated. Invoking this procedure generates a warning.
Use site_node::closest_ancestor_package. Note that site_node_closest_ancestor_package will include the passed-in node in the search, whereas the new proc doesn't by default. If you want to include the passed-in node, call site_node::closest_ancestor_package with the -include_self flag
Finds the package id of a package of specified type that is closest to the node id represented by url (or by ad_conn url).Note that closest means the nearest ancestor node of the specified type, or the current node if it is of the correct type.
Usage:
# Pull out the package_id of the subsite closest to our current node set pkg_id [site_node::closest_ancestor_package -include_self -package_key "acs-subsite"]
- Switches:
- -default (optional)
- The value to return if no package can be found
- -url (optional)
- The url of the node from which to start the search
- Parameters:
- package_keys (required)
- The type(s) of the package(s) for which we are looking
- Returns:
package_idof the nearest package of the specified type (package_key). Returns $default if no such package can be found.- See Also:
- Testcases:
- No testcase defined.
Source code: ad_log_deprecated proc site_node_closest_ancestor_package if {$url eq ""} { set url [ad_conn url] } set result [site_node::closest_ancestor_package -package_key $package_keys -url $url -include_self] if {$result eq ""} { set result $default } return $resultXQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-tcl/tcl/deprecated-procs.xql