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):
- 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 $resultXQL 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