subsite::get_element (public)

 subsite::get_element [ -subsite_id subsite_id ] -element element \
    [ -notrailing ]

Defined in packages/acs-subsite/tcl/subsite-procs.tcl

Return a single element from the information about a subsite.

Switches:
-subsite_id (optional)
The node id of the subsite for which info is requested. If no id is provided, then the id of the closest ancestor subsite will be used.
-element (required)
The element you want, one of: directory_p object_type package_key package_id name pattern_p instance_name node_id parent_id url object_id
-notrailing (optional, boolean)
If true and the element requested is a URL, then strip any trailing slash ('/'). This means the empty string is returned for the root.
Returns:
The element you asked for
Author:
Frank Nikolajsen <frank@warpspace.com>
Created:
2003-03-08

Partial Call Graph (max 5 caller/called nodes):
%3 test_user_links_api user_links_api (test acs-tcl) subsite::get_element subsite::get_element test_user_links_api->subsite::get_element ad_conn ad_conn (public) subsite::get_element->ad_conn subsite::get subsite::get (public) subsite::get_element->subsite::get Class ::xo::lti::LTI Class ::xo::lti::LTI (public) Class ::xo::lti::LTI->subsite::get_element acs_community_member_page acs_community_member_page (public) acs_community_member_page->subsite::get_element ad_admin_home ad_admin_home (public) ad_admin_home->subsite::get_element ad_pvt_home ad_pvt_home (public) ad_pvt_home->subsite::get_element ad_site_home_link ad_site_home_link (public) ad_site_home_link->subsite::get_element

Testcases:
user_links_api
Source code:
    if { $subsite_id eq "" } {
        set subsite_id [ad_conn subsite_id]
    }

    set subsite [subsite::get -subsite_id $subsite_id]
    set result [dict get $subsite $element]

    if { $notrailing_p && [string match $element "url"]} {
        set result [string trimright $result "/"]
    }

    return $result
XQL Not present:
Generic
PostgreSQL XQL file:
packages/acs-subsite/tcl/subsite-procs-postgresql.xql

Oracle XQL file:
packages/acs-subsite/tcl/subsite-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: