template::list::element::render (public)
template::list::element::render -list_name list_name \ -element_name element_name
Defined in packages/acs-templating/tcl/list-procs.tcl
Returns an ADP chunk, which must be evaluated
- Switches:
- -list_name (required)
- -element_name (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set level [template::adp_level] # Get an upvar'd reference to list_properties template::list::get_reference -name $list_name set multirow $list_properties(multirow) # Get the element properties # # We ignore if the element doesn't exist, 'cause then we'll just # hope it exists in the multirow and display the value directly get_reference -create -list_name $list_name -element_name $element_name if { [info exists element_properties(display_template_name)] && $element_properties(display_template_name) ne "" } { set stub [template::resource_path -type display_templates -style $element_properties(display_template_name)] if {[file readable $stub.adp]} { set output [template::util::read_file $stub.adp] } } if { ![info exists output] } { if { [info exists element_properties(display_template)] && $element_properties(display_template) ne "" } { set output $element_properties(display_template) } elseif { [info exists element_properties(display_col)] && $element_properties(display_col) ne "" } { set output "@$multirow.$element_properties(display_col)@" } else { set output "@$multirow.$element_name@" } } # We have support for making the cell contents a hyperlink right here, because it's so common set link_url {} set link_html {} if { [info exists element_properties(link_url_col)] && $element_properties(link_url_col) ne "" } { set link_url "@$multirow.$element_properties(link_url_col)@" } elseif { [info exists element_properties(link_url)] && $element_properties(link_url) ne "" } { set link_url $element_properties(link_url) } if { [info exists element_properties(link_html_col)] && $element_properties(link_html_col) ne "" } { set link_html "@$multirow.$element_properties(link_html_col)@" } elseif { [info exists element_properties(link_html)] && $element_properties(link_html) ne "" } { set link_html $element_properties(link_html) } if { $link_url ne "" } { set old_output $output set output [subst {<if "$link_url" not nil><a href="$link_url"[template::list::util_html_to_attributes_string $link_html]>$old_output</a></if><else>$old_output</else>}] } return $outputXQL Not present: Generic, PostgreSQL, Oracle