template::list::util_html_to_attributes_string (public)
template::list::util_html_to_attributes_string html \ [ default_summary_p ]
Defined in packages/acs-templating/tcl/list-procs.tcl
Takes a list in array get format and builds HTML attributes from them.
- Parameters:
- html (required)
- A misnomer? The input isn't HTML, the output is HTML.
- default_summary_p (optional, defaults to
"0"
)- Include a default summary if one does not exist
- Returns:
- HTML attributes built from the list in array get format 2/28/2007 - Project Zen - Modifying to handle a default value for summary if default_summary_p = 1
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set output {} set summary_exists_p 0 foreach { key value } $html { if { $key eq "summary" } { if { $value ne "" } { set summary_exists_p 1 append output " summary=\"[ns_quotehtml $value]\"" } } else { if { $value ne "" } { append output " [ns_quotehtml $key]=\"[ns_quotehtml $value]\"" } else { append output " [ns_quotehtml $key]" } } } if {$default_summary_p && !$summary_exists_p} { append output " summary=\"[_ acs-templating.DefaultSummary [list list_name \@list_properties.name\@]]\"" } return $outputXQL Not present: Generic, PostgreSQL, Oracle