ad_parse_template (public)

 ad_parse_template [ -params params ] template

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

Return a string containing the parsed and evaluated template to the caller.

Switches:
-params (optional)
The parameters to pass to the template. Note that pass-by-reference params must be in the page namespace, they cannot be in a local procedure, or any other namespace.
Parameters:
template (required)
Name of template file

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_return_exception_template ad_return_exception_template (test acs-templating) ad_parse_template ad_parse_template test_ad_return_exception_template->ad_parse_template test_create_form_with_form_instance create_form_with_form_instance (test xowiki) test_create_form_with_form_instance->ad_parse_template _ _ (public) ad_parse_template->_ ad_conn ad_conn (public) ad_parse_template->ad_conn template::util::url_to_file template::util::url_to_file (public) ad_parse_template->template::util::url_to_file Class ::xowf::test_item::Answer_manager Class ::xowf::test_item::Answer_manager (public) Class ::xowf::test_item::Answer_manager->ad_parse_template ad_page_contract ad_page_contract (public) ad_page_contract->ad_parse_template ad_page_contract_handle_datasource_error ad_page_contract_handle_datasource_error (public) ad_page_contract_handle_datasource_error->ad_parse_template ad_progress_bar_begin ad_progress_bar_begin (public) ad_progress_bar_begin->ad_parse_template ad_return_complaint ad_return_complaint (public) ad_return_complaint->ad_parse_template

Testcases:
ad_return_exception_template, create_form_with_form_instance
Source code:
    set template_params [list]
    foreach param $params {
        switch [llength $param] {
            1 { lappend template_params "&" [lindex $param 0] }
            2 { lappend template_params [lindex $param 0] [lindex $param 1] }
            default { return -code error [_ acs-templating.Template_parser_error_in_parameter_list] }
        }
    }
    return [uplevel [list template::adp_parse [template::util::url_to_file $template [ad_conn file]] $template_params]]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: