Difference between revisions of "ADP"

From AOLserver Wiki
Jump to navigation Jump to search
(imported from WiKit id 164)
 
(Undo revision 5575 by Daniel (Talk))
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
  
 
The TCL code in an ADP is contained within '''<% %>''' pseduo-tag pairs.  A modified format, '''<%= %>''', displays the results of the TCL code.  A very simple ADP would be:
 
The TCL code in an ADP is contained within '''<% %>''' pseduo-tag pairs.  A modified format, '''<%= %>''', displays the results of the TCL code.  A very simple ADP would be:
 +
 
   <html>
 
   <html>
 
       <head>
 
       <head>
Line 11: Line 12:
 
       </head>
 
       </head>
 
   <body>
 
   <body>
    
+
   <nowiki>
 
   <p>
 
   <p>
   The time is now
+
   The time is now <%= [ns_httptime [ns_time]] %>.
  <%= [[ns_httptime [ns_time]]] %>.
 
 
   </p>
 
   </p>
    
+
   </nowiki>
 
   </body>
 
   </body>
 
   </html>
 
   </html>
  
 
For a little bit more detail, and to take your first step on a long and winding road, see [[Writing Your First ADP]].
 
For a little bit more detail, and to take your first step on a long and winding road, see [[Writing Your First ADP]].

Latest revision as of 15:02, 23 November 2009

Acronym: AOLserver Dynamic Pages

ADP is the primary method of providing dynamic content on AOLserver.

ADPs contain a mixture of TCL and HTML, with the TCL code being parsed and evaluated by AOLserver as it delivers the page. ADPs may invoke other ADPs (using ns_adp_include) and thereby build up libraries for common elements and subsections of a page like title headers, menu and navigation bars, and footers, as well functional modules like acess validation or database queries.

The TCL code in an ADP is contained within <% %> pseduo-tag pairs. A modified format, <%= %>, displays the results of the TCL code. A very simple ADP would be:

  <html>
     <head>
        <title>My Clock</title>
     </head>
  <body>
  
   <p>
   The time is now <%= [ns_httptime [ns_time]] %>.
   </p>
   
  </body>
  </html>

For a little bit more detail, and to take your first step on a long and winding road, see Writing Your First ADP.