Index: openacs-4/packages/acs-templating/tcl/tag-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tag-init.tcl,v diff -u -N -r1.49.2.32 -r1.49.2.33 --- openacs-4/packages/acs-templating/tcl/tag-init.tcl 18 Jul 2023 10:27:44 -0000 1.49.2.32 +++ openacs-4/packages/acs-templating/tcl/tag-init.tcl 29 Jul 2023 12:26:49 -0000 1.49.2.33 @@ -1052,7 +1052,8 @@ # # .... # - # Potential attributes for this tag are: + # Potential attributes for are: + # - "id" # - "tag" (default "button") # - "toggle" # - "target" @@ -1067,11 +1068,13 @@ # set data [expr {[template::toolkit] eq "bootstrap5" ? "data-bs" : "data"}] + set id [ns_set iget $params id ""] set tag [ns_set iget $params tag button] + + set attributes [expr {$id eq "" ? "" : "id='$id'"}] switch $tag { - "button" {set attributes " type='[ns_set iget $params type button]'"} - "a" {set attributes " href='[ns_set iget $params href #]'"} - default {set attributes ""} + "button" {append attributes " type='[ns_set iget $params type button]'"} + "a" {append attributes " href='[ns_set iget $params href #]'"} } append attributes \ " class='[ns_set iget $params class]'" \