ad_return_template (public)

 ad_return_template [ -string ] [ template ]

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

This function is a wrapper for sundry template:: procs. Will set the template for the current page to the file named in 'template'.

Switches:
-string
(boolean) (optional)
If specified, will return the resulting page to the caller string instead sending it to the connection.
Parameters:
template (optional) - Name of template file

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_return_template ad_return_template (test acs-templating) ad_return_template ad_return_template test_ad_return_template->ad_return_template ad_conn ad_conn (public) ad_return_template->ad_conn template::adp_parse template::adp_parse (public) ad_return_template->template::adp_parse template::set_file template::set_file (public) ad_return_template->template::set_file template::util::url_to_file template::util::url_to_file (public) ad_return_template->template::util::url_to_file bm_handle_bookmark_double_click bm_handle_bookmark_double_click (public) bm_handle_bookmark_double_click->ad_return_template bm_require_delete_permission bm_require_delete_permission (public) bm_require_delete_permission->ad_return_template packages/acs-admin/www/apm/package-add.tcl packages/acs-admin/ www/apm/package-add.tcl packages/acs-admin/www/apm/package-add.tcl->ad_return_template packages/acs-admin/www/apm/package-deinstall.tcl packages/acs-admin/ www/apm/package-deinstall.tcl packages/acs-admin/www/apm/package-deinstall.tcl->ad_return_template packages/acs-admin/www/apm/package-delete-2.tcl packages/acs-admin/ www/apm/package-delete-2.tcl packages/acs-admin/www/apm/package-delete-2.tcl->ad_return_template

Testcases:
ad_return_template
Source code:
    if {$template ne ""} {
        template::set_file  [template::util::url_to_file $template [ad_conn file]]
    }

    if { $string_p } {
        #
        # We have to pass the application variables to ad_parse. As it
        # looks, we have to omit the variables in use for
        # "template::ad_parse" internally. This is not pretty, but it
        # should help to get the base mechanism working. There is
        # probably a more pretty solution for this.
        #
        set application_vars {}
        foreach var [uplevel [list info vars]] {
            if {[string match __adp* $var] || [string match __args* $var]} {
                continue
            }
            lappend application_vars $var [uplevel [list set $var]]
        }
        return [template::adp_parse [template::util::url_to_file $template [ad_conn file]] $application_vars]
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: