Index: openacs-4/packages/acs-templating/tcl/0-acs-templating-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/0-acs-templating-procs.tcl,v diff -u -r1.4.2.1 -r1.4.2.2 --- openacs-4/packages/acs-templating/tcl/0-acs-templating-procs.tcl 17 Dec 2019 12:05:42 -0000 1.4.2.1 +++ openacs-4/packages/acs-templating/tcl/0-acs-templating-procs.tcl 17 Dec 2019 17:01:20 -0000 1.4.2.2 @@ -15,8 +15,21 @@ # License. Full text of the license is available from the GNU Project: # http://www.fsf.org/copyleft/gpl.html +ad_proc -public template_tag args { + Generic wrapper for registered tag handlers. -ad_proc -public template_tag { name arglist body } { + DEPRECATED: does not comply with OpenACS naming convention + + @see template::tag +} { + return [template::tag {*}$args] +} + +ad_proc -public template::tag { + name + arglist + body +} { Generic wrapper for registered tag handlers. } { @@ -53,12 +66,11 @@ template::adp_tag_init $name - variable template::tag_stack - lappend tag_stack \[list $name \$params\] + lappend ::template::tag_stack \[list $name \$params\] $body - template::util::lpop tag_stack + template::util::lpop ::template::tag_stack return \"\" }" 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.94.2.7 -r1.94.2.8 --- openacs-4/packages/acs-templating/tcl/list-procs.tcl 16 Dec 2019 17:55:12 -0000 1.94.2.7 +++ openacs-4/packages/acs-templating/tcl/list-procs.tcl 17 Dec 2019 17:01:20 -0000 1.94.2.8 @@ -3077,7 +3077,7 @@ # ##### -template_tag listtemplate { chunk params } { +template::tag listtemplate { chunk params } { set level [template::adp_level] set list_name [template::get_attribute listtemplate $params name] @@ -3088,7 +3088,7 @@ "\[template::list::render -name \"$list_name\" -style \"$style\"\]" } -template_tag listelement { params } { +template::tag listelement { params } { set element_name [template::get_attribute listelement $params name] @@ -3098,14 +3098,14 @@ "\[template::list::element::render -list_name \${list_properties(name)} -element_name $element_name\]" } -template_tag listrow { params } { +template::tag listrow { params } { set level [template::adp_level] template::adp_append_string \ "\[template::list::render_row -name \${list_properties(name)}\]" } -template_tag listfilters { chunk params } { +template::tag listfilters { chunk params } { set level [template::adp_level] set list_name [template::get_attribute listfilters $params name] @@ -3115,7 +3115,7 @@ "\[template::list::render_filters -name \"$list_name\" -style \"$style\"\]" } -template_tag listfilters-form { chunk params } { +template::tag listfilters-form { chunk params } { set level [template::adp_level] set list_name [template::get_attribute listfilters-form $params name] Index: openacs-4/packages/acs-templating/tcl/tab-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tab-procs.tcl,v diff -u -r1.10 -r1.10.2.1 --- openacs-4/packages/acs-templating/tcl/tab-procs.tcl 14 Jun 2018 16:27:48 -0000 1.10 +++ openacs-4/packages/acs-templating/tcl/tab-procs.tcl 17 Dec 2019 17:01:20 -0000 1.10.2.1 @@ -198,7 +198,7 @@ # The tabstrip tag -template_tag tabstrip { chunk params } { +template::tag tabstrip { chunk params } { set level [template::adp_level] Index: openacs-4/packages/acs-templating/tcl/table-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/table-procs.tcl,v diff -u -r1.11 -r1.11.2.1 --- openacs-4/packages/acs-templating/tcl/table-procs.tcl 30 Apr 2018 12:45:00 -0000 1.11 +++ openacs-4/packages/acs-templating/tcl/table-procs.tcl 17 Dec 2019 17:01:20 -0000 1.11.2.1 @@ -238,7 +238,7 @@ # Register the tag that actually renders the widget -template_tag tablewidget { chunk params } { +template::tag tablewidget { chunk params } { set name [ns_set iget $params name] set style [ns_set iget $params style] 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 -r1.49.2.3 -r1.49.2.4 --- openacs-4/packages/acs-templating/tcl/tag-init.tcl 16 Nov 2019 15:09:53 -0000 1.49.2.3 +++ openacs-4/packages/acs-templating/tcl/tag-init.tcl 17 Dec 2019 17:01:20 -0000 1.49.2.4 @@ -17,7 +17,7 @@ # Add some escaped Tcl -template_tag tcl { chunk params } { +template::tag tcl { chunk params } { # if the chunk begins with = then add our own append if { [string index $chunk 0] eq "=" } { @@ -31,7 +31,7 @@ # benefit of the master template to display appropriate context, # such as the title, navigation links, etc. -template_tag property { chunk params } { +template::tag property { chunk params } { set name [ns_set iget $params name] set adp [ns_set iget $params adp] @@ -51,7 +51,7 @@ # Set the master template. -template_tag master { params } { +template::tag master { params } { set src [ns_set iget $params src] set slave_properties_p [template::get_attribute master $params slave-properties-p 0] @@ -78,7 +78,7 @@ # Insert the slave template -template_tag slave { params } { +template::tag slave { params } { #Start developer support frame around subordinate template. if { [info commands ::ds_enabled_p] ne "" && [info commands ::ds_adp_start_box] ne "" } { @@ -216,7 +216,7 @@ } } -template_tag include { params } { +template::tag include { params } { # # Check, if the src can be resolved against resources/templates in # the theme package @@ -232,7 +232,7 @@ # behaves exactly like (without the resources/templates/ # theming) # -template_tag widget { params } { +template::tag widget { params } { set src [ns_set iget $params src] set adp_stub [template::resource_path -type widgets -style $src -relative] if {[file exists $::acs::rootdir/$adp_stub.adp]} { @@ -244,7 +244,7 @@ # Repeat a template chunk for each row of a multirow data source -template_tag multiple { chunk params } { +template::tag multiple { chunk params } { set name [template::get_attribute multiple $params name ] set startrow [template::get_attribute multiple $params startrow 0] @@ -295,7 +295,7 @@ # Repeat a template chunk for each item in a list -template_tag list { chunk params } { +template::tag list { chunk params } { # the list tag accepts a value so that it may be used without a data # source in the Tcl script @@ -335,7 +335,7 @@ # Create a recursed group, generating a recursive multirow block until the # column name stays the same -template_tag group { chunk params } { +template::tag group { chunk params } { set column [template::get_attribute group $params column] set delimiter [template::get_attribute group $params delimiter ""] @@ -424,7 +424,7 @@ # Repeat a template chunk consisting of a grid cell for each row of a # multirow data source -template_tag grid { chunk params } { +template::tag grid { chunk params } { set name [template::get_attribute grid $params name] # cols must be a float for ceil to work @@ -462,20 +462,20 @@ }" } -template_tag if { chunk params } { +template::tag if { chunk params } { template::template_tag_if_condition $chunk $params if } -template_tag elseif { chunk params } { +template::tag elseif { chunk params } { template::template_tag_if_condition $chunk $params elseif } # Append an "else" clause to the if expression -template_tag else { chunk params } { +template::tag else { chunk params } { template::adp_append_code "else {" -nobreak @@ -486,7 +486,7 @@ # Output a template chunk without parsing, for preprocessed templates -template_tag noparse { chunk params } { +template::tag noparse { chunk params } { # escape quotes regsub -all {[\]\[""\\$]} $chunk {\\&} quoted @@ -497,7 +497,7 @@ # Render the HTML for the form widget, incorporating any additional # markup attributes specified in the template. -template_tag formwidget { params } { +template::tag formwidget { params } { set id [template::get_attribute formwidget $params id] @@ -510,7 +510,7 @@ # Display the help information for an element -template_tag formhelp { params } { +template::tag formhelp { params } { set id [template::get_attribute formhelp $params id] @@ -523,7 +523,7 @@ # Report a form error if one is specified. -template_tag formerror { chunk params } { +template::tag formerror { chunk params } { set id [template::get_attribute formerror $params id] set type [ns_set get $params type] @@ -553,7 +553,7 @@ # Render a group of form widgets -template_tag formgroup { chunk params } { +template::tag formgroup { chunk params } { set id [template::get_attribute formgroup $params id] @@ -580,7 +580,7 @@ } # render one element from a formgroup -template_tag formgroup-widget { chunk params } { +template::tag formgroup-widget { chunk params } { set id [template::get_attribute formgroup-widget $params id] set row [template::get_attribute formgroup-widget $params row] @@ -603,7 +603,7 @@ # specified in the template. Set the magic variable "form:id" # for elements to reference -template_tag formtemplate { chunk params } { +template::tag formtemplate { chunk params } { set level [template::adp_level] set id [template::get_attribute formtemplate $params id] @@ -664,7 +664,7 @@ # # @param params The ns_set id for extra HTML parameters -template_tag child { params } { +template::tag child { params } { publish::process_tag child $params } @@ -679,7 +679,7 @@ # # @param params The ns_set id for extra HTML parameters -template_tag relation { params } { +template::tag relation { params } { publish::process_tag relation $params } @@ -695,7 +695,7 @@ # # @param params The ns_set id for extra HTML parameters -template_tag content { params } { +template::tag content { params } { # Get item id/revision_id set item_id [publish::get_main_item_id] @@ -725,7 +725,7 @@ # # @author Lars Pind (lars@collaboraid.net) -template_tag include-optional { chunk params } { +template::tag include-optional { chunk params } { # # Check, if the src can be resolved against resources/templates in @@ -772,15 +772,15 @@ # # @author Lars Pind (lars@collaboraid.net) -template_tag include-output { params } { +template::tag include-output { params } { template::adp_append_code { if { [info exists __adp_include_optional_output] } { append __adp_output [lindex $__adp_include_optional_output end] } } } -template_tag trn { chunk params } { +template::tag trn { chunk params } { # DRB: we have to do our own variable substitution as the template framework doesn't handle # it for us ... being able to use page variables here is consistent with the rest # of the templating engine. @@ -852,7 +852,7 @@ # The flag switch is optional and it defaults to exact if not specified. # Valid values are exact, regexp, and glob -template_tag switch { chunk params } { +template::tag switch { chunk params } { set sw "" set arg "" @@ -882,7 +882,7 @@ # case statements as part of switch statement as shown above # -template_tag case { chunk params } { +template::tag case { chunk params } { # Scan the parameter stack backward, looking for the tag name @@ -956,7 +956,7 @@ # default value for case statement which is a sub-tag in switch tag -template_tag default { chunk params } { +template::tag default { chunk params } { # Scan the parameter stack backward, looking for the tag name @@ -977,13 +977,13 @@ # # @author Ben Bytheway (ben@vrusp.com) -template_tag contract { chunk params } {} +template::tag contract { chunk params } {} -template_tag comment { chunk params } {} +template::tag comment { chunk params } {} -template_tag box { chunk params } { +template::tag box { chunk params } { set class [ns_set iget $params class] set title [ns_set iget $params title]