|[Public Only | All]|
Procs to manage application groups
- CVS Identification:
$Id: subsite-procs.tcl,v 22.214.171.124 2014/09/09 08:31:59 gustafn Exp $
subsite::add_section_row -array array -base_url base_url \ -multirow multirow [ -section section ]
Helper proc for adding rows of sections to the page flow of the subsite.
subsite::after_mount -package_id package_id -node_id node_id
This is the Tcl proc that is called automatically by the APM whenever a new instance of the subsites application is mounted.
subsite::auto_mount_application [ -instance_name instance_name ] \ [ -pretty_name pretty_name ] [ -node_id node_id ] package_key
Mounts a new instance of the application specified by package_key beneath node_id. This proc makes sure that the instance_name (the name of the new node) is unique before invoking site_node::instantiate_and_mount.
subsite::before_uninstantiate -package_id package_id
Delete the application group associated with this subsite.
subsite::before_upgrade -from_version_name from_version_name \ -to_version_name to_version_name
subsite::default::create_app_group [ -package_id package_id ] \ [ -name name ]
Create the default application group for a subsite.
subsite::default::delete_app_group [ -package_id package_id ]
Delete the default application group for a subsite.
subsite::define_pageflow [ -sections_multirow sections_multirow ] \ [ -subsections_multirow subsections_multirow ] \ [ -section section ] [ -url url ]
Defines the page flow of the subsite TODO: add an image TODO: add link_p/selected_p for subsections
subsite::delete_subsite_theme -key key
Delete a subsite theme, making it unavailable to the theme configuration code.
subsite::get [ -subsite_id subsite_id ] -array array
Get information about a subsite.
Gets options list for applications to install
subsite::get_element [ -subsite_id subsite_id ] -element element \ [ -notrailing ]
Return a single element from the information about a subsite.
subsite::get_pageflow_struct [ -url url ]
Defines the page flow structure.
subsite::get_section_info [ -array array ] \ [ -sections_multirow sections_multirow ]
Takes the sections_multirow and sets the passed array name with the elements label and url of the selected section.
Gets options for subsite themes for use with a form builder select widget.
subsite::get_url [ -node_id node_id ] [ -absolute_p absolute_p ] \ [ -force_host force_host ] [ -strict_p strict_p ] \ [ -protocol protocol ] [ -port port ]
Returns the url stub for the specified subsite. If -absolute is supplied then this function will generate absolute urls. If the site is currently being accessed via a host node mapping or -force_host_node_map is also supplied then URLs will ommit the corresponding subsite url stub. The host name will be used for any appropriate subsite when absolute urls are generated.
Get the package_id of the Main Site. The Main Site is the subsite that is always mounted at '/' and that has a number of site-wide parameter settings.
subsite::new_subsite_theme -key key -name name -template template \ [ -css css ] [ -form_template form_template ] \ [ -list_template list_template ] \ [ -list_filter_template list_filter_template ]
Add a new subsite theme, making it available to the theme configuration code.
Get the list of packages which can be subsites. This is built during the bootstrap process. If you install a new subsite-implementing package and don't accept the installers invitation to reboot openacs, tough luck.
subsite::pivot_root [ -node_id node_id ]
Pivot the package associated with node_id onto the root. Mounting the current root package under node_id.
subsite::set_theme [ -subsite_id subsite_id ] -theme theme
Set the theme for the given subsite. This will change the subsite's ThemeKey, DefaultMaster, and ThemeCSS parameters.
Verifies SolicitPortraitP parameter to ensure upload portrait security.
Get a list of pretty name, package key pairs for all packages which identify themselves as implementing subsite semantics.
subsite::util::object_type_path_list object_type [ ancestor_type ]
returns pretty name of object. We need this so often that I thought I'd stick it in a proc so it can possibly be cached later.
subsite::util::packages [ -node_id node_id ]
Return a list of package_id's for the subsite containing node_id This is a memoized function which caches for 20 minutes.
Given a list of return_urls, we recursively encode them into one return_url that can be redirected to or passed into a page. As long as each page in the list does the typical redirect to return_url, then the page flow will go through each of the pages in $return_url_list
[ show source ]