Index: openacs-4/packages/acs-templating/www/doc/migration.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/migration.html,v diff -u -N -r1.3.2.1 -r1.3.2.2 --- openacs-4/packages/acs-templating/www/doc/migration.html 22 Jun 2016 07:48:43 -0000 1.3.2.1 +++ openacs-4/packages/acs-templating/www/doc/migration.html 22 Apr 2017 18:30:26 -0000 1.3.2.2 @@ -12,7 +12,7 @@

In a Nutshell

- When templatizing a legacy tcl page, your task is to + When templatizing a legacy Tcl page, your task is to separate code and graphical presentation. The latter goes into an ADP file; it contains essentially HTML, augmented by a few special tags and the @variable@ construct. @@ -36,7 +36,7 @@

At the end of the Tcl script, you should call ad_return_template. The template runs after the - tcl script, and can use these data sources. + Tcl script, and can use these data sources.

Make sure that the fancy adp parser is enabled in your AOL ini @@ -54,13 +54,13 @@ wait till the headers are written or the page is completed; they may act differently than you expect.

  • - If you can, put code in the tcl file, not between <% + If you can, put code in the Tcl file, not between <% %> in the adp page.
  • - Put HTML in the adp page, not int the tcl program. Put + Put HTML in the adp page, not int the Tcl program. Put reusable HTML fragments in a separate adp file (think of it as a widget) that will be <include>d from - several pages. Prefer this to writing a tcl proc that returns + several pages. Prefer this to writing a Tcl proc that returns HTML.
  • Remember to remove backslashes where you had to escape special @@ -92,7 +92,7 @@

    - + @@ -251,7 +251,7 @@
    old tcl codeold Tcl code new
    - + @@ -420,12 +420,12 @@ own multirow variable. In the excert below, taken from /pvt/alerts.tcl and /pvt/alerts.adp, the foreach logic made it hard to use the db_multirow because it needed a combination of the - output from sql and also the output of tcl procedures using that + output from sql and also the output of Tcl procedures using that value.
    old tcl codeold Tcl code new
    - +
    old tcl codeold Tcl code new