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 (optional, boolean)
- 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):
- 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