template::themed_template (public)

 template::themed_template [ -verbose ] path

Defined in packages/acs-templating/tcl/util-procs.tcl

Given a path like /packages/acs-admin/www/index pointing to an .adp file, this function tries to locate this path in the ResourceDir of the subsite (determined by the theme). If found the themed template is returned, otherwise the passed template path.

Switches:
-verbose (optional, boolean, defaults to "false")
Parameters:
path (required)
absolute path within the open acs tree (without extension)
Returns:
path to themed template or input value (without extension)

Partial Call Graph (max 5 caller/called nodes):
%3 ad_page_contract ad_page_contract (public) template::themed_template template::themed_template ad_page_contract->template::themed_template adp_parse_ad_conn_file adp_parse_ad_conn_file (private) adp_parse_ad_conn_file->template::themed_template apidoc::xql_links_list apidoc::xql_links_list (private) apidoc::xql_links_list->template::themed_template apm_build_repository apm_build_repository (private) apm_build_repository->template::themed_template apm_git_build_repository apm_git_build_repository (private) apm_git_build_repository->template::themed_template template::resource_path template::resource_path (public) template::themed_template->template::resource_path

Testcases:
No testcase defined.
Source code:
    if {[string index $path 0] eq "/"} {
        set style [string range $path 1 end]
    } else {
        set style $path
    }
    set stub [template::resource_path  {*}[expr {$verbose_p ? "-verbose" : ""}]  -type templates -style $style -relative]
    if {[file readable $::acs::rootdir/$stub.adp]} {
        if {$verbose_p} {
            ns_log notice "themed_template: found template in $stub"
        }
        return $stub
    } else {
        if {$verbose_p} {
            ns_log notice "themed_template: no themed template found for '$path'"
        }
    }
    return $path
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: