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):
%3 template::list::element::render template::list::element::render (public) template::list::util_html_to_attributes_string template::list::util_html_to_attributes_string template::list::element::render->template::list::util_html_to_attributes_string template::list::element::set_property template::list::element::set_property (public) template::list::element::set_property->template::list::util_html_to_attributes_string template::list::template template::list::template (private) template::list::template->template::list::util_html_to_attributes_string _ _ (public) template::list::util_html_to_attributes_string->_

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 $output
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: