template::adp_level (public)
template::adp_level [ up ]
Defined in packages/acs-templating/tcl/parse-procs.tcl
Get the stack frame level at which the template is being evaluated. This is used extensively for obtaining references to data sources, as well template objects such as forms and wizards
- Parameters:
- up (optional)
- A relative reference to the "parse level" of interest. Useful in the context of an included template to reach into the stack frame in which the container template is being parsed, for accessing data sources or other objects. The default is the highest parse level.
- Returns:
- A number, as returned by [info level], representing the stack frame in which a template is being parsed.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- adp_level
Source code: set result "" # when serving a page, this variable is always defined. # but we need to check it for the case of isolated compilation if { [info exists ::template::parse_level] } { if {$up eq ""} { set result [lindex $::template::parse_level end] } else { set result [lindex $::template::parse_level [llength $::template::parse_level]-$up] } } return $resultXQL Not present: Generic, PostgreSQL, Oracle