previo | siguiente |
A template in the OpenACS system consists of an ADP page (HTML augmented with additional tags) with an optional TCL script. The two have the same name, differentiated only by extension. In other words, the template foo consists of two files, foo.tcl and foo.adp. Conceptually, the TCL file is executed and the output blended with the ADP file to form the page that's returned to the user's browser. A major engineering standard for the OpenACS project is that Tcl code should not be included in ADP files, and HTML should not be included in TCL files. When you read .LRN-specific packages, you'll learn that the vendor did not always follow this guideline. It is bad practice, we are slowly cleaning up that code. Do not write such code yourself. In addition to special tags (described later), there are two special constructs (with variants) that are of crucial importance:
|
|
As you read the code, you'll see that older packages which have not been internationalized have ADP files with literal strings written in English. Newer packages contain ADP files which are a bit more cryptic, consisting mostly of structural HTML tags, variable references, and message keys. |