publish::get_publish_roots (public)

 publish::get_publish_roots

Defined in packages/acs-content-repository/tcl/publish-procs.tcl

Get a list of all page roots to which files may be published. The publish roots are controlled by the PublishRoots parameter in CMS, which should be a space-separated list of all the roots. Relative paths are relative to publish::get_page_root. The default is [list [publish::get_page_root]]

Returns:
A list of all the publish roots
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 publish::handle_binary_file publish::handle_binary_file (public) publish::get_publish_roots publish::get_publish_roots publish::handle_binary_file->publish::get_publish_roots ad_conn ad_conn (public) publish::get_publish_roots->ad_conn parameter::get parameter::get (public) publish::get_publish_roots->parameter::get publish::get_page_root publish::get_page_root (public) publish::get_publish_roots->publish::get_page_root

Testcases:
No testcase defined.
Source code:
    # LARS TODO: This parameter doesn't exist, it's a remnant from the CMS package
    set root_paths [parameter::get  -package_id [ad_conn package_id]  -parameter PublishRoots]

    if { [llength $root_paths] == 0 } {
        set root_paths [list [get_page_root]]
    }

    # Resolve relative paths
    set page_root [publish::get_page_root]
    set absolute_paths [list]
    foreach path $root_paths {
        if { [string index $path 0] ne "/" } {
            lappend absolute_paths [ns_normalizepath "$page_root/$path"]
        } else {
            lappend absolute_paths $path
        }
    }

    return $absolute_paths
Generic XQL file:
packages/acs-content-repository/tcl/publish-procs.xql

PostgreSQL XQL file:
packages/acs-content-repository/tcl/publish-procs-postgresql.xql

Oracle XQL file:
packages/acs-content-repository/tcl/publish-procs-oracle.xql

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