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 -r1.3 -r1.3.2.1 --- openacs-4/packages/acs-templating/www/doc/migration.html 27 Oct 2014 16:40:14 -0000 1.3 +++ openacs-4/packages/acs-templating/www/doc/migration.html 22 Jun 2016 07:48:43 -0000 1.3.2.1 @@ -13,9 +13,9 @@

In a Nutshell

When templatizing a legacy tcl page, your task is to - separate code and graphical presentation. The latter goes + 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. + special tags and the @variable@ construct. The code goes into a Tcl script. In other words, a templated page consists of two files, a Tcl part that puts its results in data sources, and an ADP page (the template), into which these data @@ -66,7 +66,7 @@ Remember to remove backslashes where you had to escape special characters, as in
Nuts  \$2.70 \[<a href=\"shoppe[<a href="\"shoppe\">buy</a>\]
 	  
@@ -90,17 +90,17 @@ <form>. I reformatted it a bit to make three panes fit next to each other and to line up corresponding code.

- +
- - + + - - -
old tcl codenewold tcl codenew
packages/news/www/item-view.tcl packages/news/www/item-view.adp
+
 # /packages/news/admin/index.tcl
 ad_page_contract {
@@ -148,7 +148,7 @@
 return
 	  
+
 
 ad_page_contract {
@@ -195,7 +195,7 @@
 ad_return_template
 	  
+
 
 
@@ -249,17 +249,17 @@
     following example shows the part of the index page of
     the News module that uses the mechanism, not a whole page.
 
-    
+    
- - + + - - - - - + + + - - -
old tcl codenewold tcl codenew
packages/news/www/index.tcl packages/news/www/index.adp
+
 ad_page_contract {
 
@@ -275,7 +275,7 @@
 }
 	  
+
 ad_page_contract {
 
@@ -293,19 +293,19 @@
   context_bar:onevalue
   subsite_id:onevalue
   subsite:multirow
-  item:multirow
+  item:multirow
   footer:onevalue
 }
 	  
 
..................
+
 append body "
 <ul>
@@ -319,8 +319,8 @@
     and (   expiration_date is null
          or expiration_date > sysdate)
 } {
-    append body "<li><a href=
-	\"item-view?news_item_id="\
+    append body "<li><a href="
+	\"item-view?news_item_id="\
 	"$news_item_id\"
 	>$title</a>\n"
 
@@ -341,13 +341,13 @@
 </ul>
 "
+
 
 
 
 
-db_multirow item news_items_select {
+db_multirow item news_items_select {
     select news_item_id, title
     from news_items_obj
     where context_id = :subsite_id
@@ -357,13 +357,13 @@
 }
 	  
+
 
 <ul>
 
 
-<multiple name=item>
+<multiple name=item>
 
 
 
@@ -372,12 +372,12 @@
 
 
   <li><a href=
-      "item-view?news_item_id=<%
-      %>@item.news_item_id@"
-      >@item.title@</a>
+      "item-view?news_item_id=<%
+      %>@item.news_item_id@"
+      >@item.title@</a>
 </multiple>
 
-<if @item:rowcount@ eq 0>
+<if @item:rowcount@ eq 0>
   <li>There are
   currently no news items
   available.
@@ -423,25 +423,25 @@
     output from sql and also the output of tcl procedures using that
     value.
 
-    
+    
- - + + - - - - - + + + - - -
old tcl codenewold tcl codenew
packages/acs-core-ui/www/pvt/alerts.tcl packages/acs-core-ui/www/pvt/alerts.adp
+
 ad_page_contract {
     @cvs-id $Id$
 } {
 }	  
 	  
+
 ad_page_contract {
     @cvs-id $Id$
@@ -462,11 +462,11 @@
 	
 
..................
+
 
 
@@ -494,15 +494,15 @@
      # alert has been disabled 
      set status "Disabled"
      set action "
-     <a href=\"/bboard/alert-reenable\">
-     Re-enable</a>"
+     <a href="\"/bboard/alert-reenable\">
+"     Re-enable</a>"
    } else {
      # alert is enabled
      set status "
      <font color=red>Enabled</font>"
      set action "
-     <a href=\"/bboard/alert-disable\">
-     Disable</a>"
+     <a href="\"/bboard/alert-disable\">
+"     Disable</a>"
    }
 
    append existing_alert_rows "<tr>
@@ -546,7 +546,7 @@
 }
 	  
+
 set discussion_forum_alert_p 0
 
@@ -596,7 +596,7 @@
 	  
 	  
+