content::get_template_root (public)
content::get_template_root
Defined in packages/acs-content-repository/tcl/filter-procs.tcl
Find the directory in the filesystem where templates are stored. There are a variety of ways in which this can be set. The proc looks for that directory in the following places in this order: (1) the TemplateRoot parameter of the package for which the request is made, i.e., [ad_conn package_id] (2) the TemplateRoot parameter of the acs-content-repository If it is not found in any of these places, it defaults to $::acs::rootdir/templates If the value resulting from the search does not start with a '/' it is taken to be relative to $::acs::rootdir
- Returns:
- the template root (full path from /)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: # Look for package-defined root set package_id [ad_conn package_id] set template_root [parameter::get -package_id $package_id -parameter TemplateRoot -default ""] if { $template_root eq "" } { # Look for template root defined in the CR set package_id [apm_package_id_from_key "acs-content-repository"] set template_root [parameter::get -package_id $package_id -parameter TemplateRoot -default "templates"] } if { [string index $template_root 0] ne "/" } { # Relative path, prepend server_root set template_root "$::acs::rootdir/$template_root" } return [ns_normalizepath $template_root]Generic XQL file: packages/acs-content-repository/tcl/filter-procs.xql
PostgreSQL XQL file: packages/acs-content-repository/tcl/filter-procs-postgresql.xql
Oracle XQL file: packages/acs-content-repository/tcl/filter-procs-oracle.xql