Index: openacs-4/packages/acs-templating/www/doc/design.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/design.adp,v
diff -u -r1.2.2.5 -r1.2.2.6
--- openacs-4/packages/acs-templating/www/doc/design.adp 5 Jul 2016 12:14:22 -0000 1.2.2.5
+++ openacs-4/packages/acs-templating/www/doc/design.adp 7 Nov 2016 19:23:16 -0000 1.2.2.6
@@ -1,5 +1,5 @@
-The Template System -- Design Document
Index: openacs-4/packages/acs-templating/www/doc/designer-guide.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/designer-guide.adp,v
diff -u -r1.2.2.4 -r1.2.2.5
--- openacs-4/packages/acs-templating/www/doc/designer-guide.adp 5 Jul 2016 12:14:22 -0000 1.2.2.4
+++ openacs-4/packages/acs-templating/www/doc/designer-guide.adp 7 Nov 2016 19:23:16 -0000 1.2.2.5
@@ -1,5 +1,5 @@
-Designer Guide
Index: openacs-4/packages/acs-templating/www/doc/developer-guide.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/developer-guide.adp,v
diff -u -r1.2.2.4 -r1.2.2.5
--- openacs-4/packages/acs-templating/www/doc/developer-guide.adp 5 Jul 2016 12:14:22 -0000 1.2.2.4
+++ openacs-4/packages/acs-templating/www/doc/developer-guide.adp 7 Nov 2016 19:23:16 -0000 1.2.2.5
@@ -1,5 +1,5 @@
-Programmer / Developer Guide
Index: openacs-4/packages/acs-templating/www/doc/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/index.adp,v
diff -u -r1.2.2.7 -r1.2.2.8
--- openacs-4/packages/acs-templating/www/doc/index.adp 5 Jul 2016 12:14:22 -0000 1.2.2.7
+++ openacs-4/packages/acs-templating/www/doc/index.adp 7 Nov 2016 19:23:16 -0000 1.2.2.8
@@ -1,5 +1,5 @@
-Templating System
Index: openacs-4/packages/acs-templating/www/doc/install.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/install.adp,v
diff -u -r1.2.2.4 -r1.2.2.5
--- openacs-4/packages/acs-templating/www/doc/install.adp 5 Jul 2016 12:14:22 -0000 1.2.2.4
+++ openacs-4/packages/acs-templating/www/doc/install.adp 7 Nov 2016 19:23:16 -0000 1.2.2.5
@@ -1,5 +1,5 @@
-Installation
Index: openacs-4/packages/acs-templating/www/doc/introduction.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/introduction.adp,v
diff -u -r1.2.2.3 -r1.2.2.4
--- openacs-4/packages/acs-templating/www/doc/introduction.adp 5 Jul 2016 12:14:22 -0000 1.2.2.3
+++ openacs-4/packages/acs-templating/www/doc/introduction.adp 7 Nov 2016 19:23:16 -0000 1.2.2.4
@@ -1,5 +1,5 @@
-Goals
Index: openacs-4/packages/acs-templating/www/doc/migration.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/migration.adp,v
diff -u -r1.3.2.11 -r1.3.2.12
--- openacs-4/packages/acs-templating/www/doc/migration.adp 5 Jul 2016 12:14:22 -0000 1.3.2.11
+++ openacs-4/packages/acs-templating/www/doc/migration.adp 7 Nov 2016 19:23:16 -0000 1.3.2.12
@@ -1,5 +1,5 @@
-Templating an Existing Tcl Page
Index: openacs-4/packages/acs-templating/www/doc/no-quote-upgrade.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/no-quote-upgrade.adp,v
diff -u -r1.3.2.5 -r1.3.2.6
--- openacs-4/packages/acs-templating/www/doc/no-quote-upgrade.adp 5 Jul 2016 12:14:22 -0000 1.3.2.5
+++ openacs-4/packages/acs-templating/www/doc/no-quote-upgrade.adp 7 Nov 2016 19:23:16 -0000 1.3.2.6
@@ -1,5 +1,5 @@
-Upgrading existing ADPs to noquote templating
Index: openacs-4/packages/acs-templating/www/doc/noquote.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/noquote.adp,v
diff -u -r1.3.2.4 -r1.3.2.5
--- openacs-4/packages/acs-templating/www/doc/noquote.adp 5 Jul 2016 12:14:22 -0000 1.3.2.4
+++ openacs-4/packages/acs-templating/www/doc/noquote.adp 7 Nov 2016 19:23:16 -0000 1.3.2.5
@@ -1,5 +1,5 @@
-
-doc_body_append "<ul>\n" set db [ns_db gethandle] set selection -[ns_db select $db {SELECT name FROM bboard_forums}] while {[ns_db -getrow $db $selection]} { set_variables_after_query doc_body_append -"<li>Forum: <tt>[ns_quotehtml $name]</tt>\n" } +doc_body_append "<ul>\n" +set db [ns_db gethandle] +set selection [ns_db select $db {SELECT name FROM bboard_forums}] +while {[ns_db getrow $db $selection]} { + set_variables_after_query + doc_body_append "<li>Forum: <tt>[ns_quotehtml $name]</tt>\n" +} doc_body_append "</ul>\n"
Obviously, this was very error-prone, and more often than not, the programmers would forget to quote the variables that come from @@ -99,16 +102,21 @@ change is that it comes in two parts: the presentation template, and the programming logic code. The template will look like this:
-<ul> <multiple name=forums> <li>Forum: - <tt>\@forums.name\@</tt> </multiple> </ul> +<ul> + <multiple name=forums> + <li>Forum: <tt>\@forums.name\@</tt> + </multiple> +</ul>
Once you understand the (simple) workings of the multiple tag, this version strikes you as much more readable than the old one. But we're not done yet: we need to write the Tcl code that grabs forum names from the database. The db_multirow proc is designed exactly for this; it retrieves rows from the database and assigns variables from each row to template variables in each pass of a multiple of our choice.
-db_multirow forums get_forum_names { SELECT name FROM forums } +db_multirow forums get_forum_names { + SELECT name FROM forums +}
At this point the careful reader will wonder at which point the forum name gets quoted, and if so, how does the templating system know whether the forum name needs to be quoted or not? The answer @@ -181,9 +189,9 @@ included into the next ACS release. Since the change is incompatible, it will be announced to module owners and the general public. Explanation on how to port your existing modules and the -"gotchas" that one can expect follows in a separate document .
The discussion about speed, i.e. benchmarking results before and -after the change, is also -available .
+"gotchas" that one can expect follows in a separate document . +> +<switch \@x\@> <case in "Fred" "Greta" "Sam"> - Your must be Fred Greta or Sam, but I'm not sure which one. + Your must be Fred Greta or Sam, but I'm not sure which one. </case> <default> I don't recognize your name. Index: openacs-4/packages/acs-templating/www/doc/tagref/variable.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/variable.adp,v diff -u -r1.3.2.4 -r1.3.2.5 --- openacs-4/packages/acs-templating/www/doc/tagref/variable.adp 22 Jun 2016 07:48:44 -0000 1.3.2.4 +++ openacs-4/packages/acs-templating/www/doc/tagref/variable.adp 7 Nov 2016 19:23:16 -0000 1.3.2.5 @@ -1,5 +1,5 @@ -{/doc/acs-templating {Templating}} {Templating System Tag Reference: Variables} +{/doc/acs-templating {ACS Templating}} {Templating System Tag Reference: Variables} Templating System Tag Reference: Variables Variables
Index: openacs-4/packages/acs-templating/www/doc/widgets/date.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/widgets/date.adp,v diff -u -r1.2.2.3 -r1.2.2.4 --- openacs-4/packages/acs-templating/www/doc/widgets/date.adp 5 Jul 2016 12:14:22 -0000 1.2.2.3 +++ openacs-4/packages/acs-templating/www/doc/widgets/date.adp 7 Nov 2016 19:23:16 -0000 1.2.2.4 @@ -1,5 +1,5 @@ -{/doc/acs-templating {Templating}} {Templating System Widget Reference: Date} +{/doc/acs-templating {ACS Templating}} {Templating System Widget Reference: Date} Templating System Widget Reference: Date The Date Widget
Index: openacs-4/packages/acs-templating/www/doc/widgets/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/widgets/index.adp,v diff -u -r1.2.2.2 -r1.2.2.3 --- openacs-4/packages/acs-templating/www/doc/widgets/index.adp 5 Jul 2016 12:14:22 -0000 1.2.2.2 +++ openacs-4/packages/acs-templating/www/doc/widgets/index.adp 7 Nov 2016 19:23:16 -0000 1.2.2.3 @@ -1,5 +1,5 @@ -{/doc/acs-templating {Templating}} {Templating System Widget Reference} +{/doc/acs-templating {ACS Templating}} {Templating System Widget Reference} Templating System Widget Reference Slave
Index: openacs-4/packages/acs-templating/www/doc/widgets/input.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/widgets/input.adp,v diff -u -r1.4.2.6 -r1.4.2.7 --- openacs-4/packages/acs-templating/www/doc/widgets/input.adp 3 Nov 2016 08:00:04 -0000 1.4.2.6 +++ openacs-4/packages/acs-templating/www/doc/widgets/input.adp 7 Nov 2016 19:23:16 -0000 1.4.2.7 @@ -1,5 +1,5 @@ -{/doc/acs-templating {Templating}} {Templating System Widget Reference: Input} +{/doc/acs-templating {ACS Templating}} {Templating System Widget Reference: Input} Templating System Widget Reference: Input The Input Widgets
@@ -46,9 +46,9 @@ .The default form template renders the Radio Group widget as a column of radio buttons. Since the Radio Group can consist of many -HTML controls, the usual formwidget tag cannot be used -to position the widget; instead, the formgroup tag must be -used.
+HTML controls, the usual formwidget tag +cannot be used to position the widget; instead, the formgroup tag must +be used.The Checkbox Group Widget
This widget is identical in use to the Radio Group widget, but instead of radio buttons it generates a group of checkboxes, any Index: openacs-4/packages/acs-templating/www/doc/widgets/select.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/widgets/select.adp,v diff -u -r1.2.2.4 -r1.2.2.5 --- openacs-4/packages/acs-templating/www/doc/widgets/select.adp 5 Jul 2016 12:14:22 -0000 1.2.2.4 +++ openacs-4/packages/acs-templating/www/doc/widgets/select.adp 7 Nov 2016 19:23:16 -0000 1.2.2.5 @@ -1,5 +1,5 @@ -
{/doc/acs-templating {Templating}} {Templating System Widget Reference: Select} +{/doc/acs-templating {ACS Templating}} {Templating System Widget Reference: Select} Templating System Widget Reference: Select The Input Widgets
Index: openacs-4/packages/acs-templating/www/doc/widgets/table.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/widgets/table.adp,v diff -u -r1.2.2.2 -r1.2.2.3 --- openacs-4/packages/acs-templating/www/doc/widgets/table.adp 5 Jul 2016 12:14:22 -0000 1.2.2.2 +++ openacs-4/packages/acs-templating/www/doc/widgets/table.adp 7 Nov 2016 19:23:16 -0000 1.2.2.3 @@ -1,5 +1,5 @@ -{/doc/acs-templating {Templating}} {Templating System Widget Reference: Table} +{/doc/acs-templating {ACS Templating}} {Templating System Widget Reference: Table} Templating System Widget Reference: Table Table Widget