A typical page served to a browser is made up from several component pages. The idea is to have reusable parts (widgets, skins), a bit like in a programming language where code that may be used more than once makes up a procedure. The complete page may -have the following structure.
-master
The "root" page includes the "widget" and wraps itself in the -"master". That page in turn includes the "top" and "bottom". Overall structureThe parts are put together with the The "root" page includes the "widget" and +wraps itself in the "master". That page in turn includes +the "top" and "bottom". +Overall structure+The parts are put together with the
Any (sub)page can have 0 or 1 master and 0 or more included + Any (sub)page can have 0 or 1 master and 0 or more included
pages. Each page has its own separate scope for variables.
Arguments can be passed to dependent pages as attributes to
Evaluation OrderSometimes it is of interest in which order the different parts
-are evaluated. The "code" always runs first, followed by the
-template. The
Here we assume the ACS/Tcl situation, where the "code" is a tcl -script in a .tcl file. The template is a .adp file. Variants of Page NodesThe graph of the overall structure has five nodes, shown as a + Here we assume the ACS/Tcl situation, where the "code" +is a Tcl script in a .tcl file. The template is a .adp file. +Variants of Page Nodes+The graph of the overall structure has five nodes, shown as a code/template pair. This is the standard situation, where the -"code" part sets up datasources and the template uses them. In some -situations, the following facility can help to reduce duplication -or to handle special situations more effectively. The "code" part can divert to another page by calling +"code" part sets up datasources and the template uses +them. In some situations, the following facility can help to reduce +duplication or to handle special situations more effectively. +The "code" part can divert to another page by calling
This assumes page "A" was originally wanted. An arrow () exits from code
-which calls Furthermore either of the final files can be omitted if it is -not needed, giving three basic possibilities. This assumes page "A" was originally wanted. An arrow
+() exits from
+code which calls Furthermore either of the final files can be omitted if it is +not needed, giving three basic possibilities. +
It is an error to omit both parts; this is a special case -intended to speed up debugging. templating\@arsdigita.com - + It is an error to omit both parts; this is a special case +intended to speed up debugging. ++ \ No newline at end of file |