Index: openacs-4/packages/acs-templating/tcl/list-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/list-procs.tcl,v diff -u -r1.98 -r1.99 --- openacs-4/packages/acs-templating/tcl/list-procs.tcl 6 Nov 2024 12:18:43 -0000 1.98 +++ openacs-4/packages/acs-templating/tcl/list-procs.tcl 6 Nov 2024 12:37:39 -0000 1.99 @@ -906,9 +906,18 @@ ad_proc -public template::list::write_csv { -name:required + {-label_headers:boolean true} {-delimiter ","} } { Writes a CSV to the connection + + @param name template::list name + @param lable_headers When set, element labels, typically human + readable, will be used as column + headers. When not set, the column names will + be used, which is useful when e.g. importing + the CSV somewhere. + @param delimiter CSV delimiter } { # Creates the '_eval' columns and aggregates template::list::prepare_for_rendering -name $name @@ -932,7 +941,7 @@ } } - lappend __output $__csv_labels + lappend __output [expr {$label_headers_p ? $__csv_labels : $__csv_cols}] set __rowcount [template::multirow size $list_properties(multirow)] set __rownum 0