Samples
Templating System : Demo As the links reveal, the "Data" files have the extension.tcl
and the "Template" files have
.adp
. If you want to see a little behind the scenes,
you can look at the Tcl code into which we compile the template.
The last column will deliver the resulting page to your browser.
Mechanisms underlaid in red are known to not work.
General
Description | Data | Template | Compiled Template | Output |
---|---|---|---|---|
Simple variable substitution | View | View | View | View |
Using bind variables in your query | View | View | View | View |
A plain Tcl page that returns its own output | View | None | None | View |
Conditional Expressions | View | View | View | View |
Comments | None | View | View | View |
Combining templates
Description | Data | Template | Compiled Template | Output |
---|---|---|---|---|
Include a template within another template | View |
include included |
include included | View |
Wrap a page within a master template | None |
Slave Master |
Slave Master | View |
Using the default master | None | View | View | View |
Include with master and recursion. Remember Fibonacci from pset 1, exercise 1? |
Start Included Master |
Start Included Master |
Start Included Master | View |
Embedded Tcl
Description | Data | Template | Compiled Template | Output |
---|---|---|---|---|
Tcl escape with implicit output | View | View | View | View |
Tcl escape with explicit output | None | View | View | View |
Template chunks within escaped Tcl code blocks | View | View | View | View |
Puts (if you absolutely must) | View | View | View | View |
Iteration
To see the following examples with different data, you can enter additional users into the sample table with "a simple form" or change them with "editing: several pages in one" in section Using the Form Manager below.Description | Data | Template | Compiled Template | Output | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Repeating template chunks for each row of a query result | View | View | View | View | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generating the multirow datasource in TCL | View | View | View | View | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Repeating template chunks for each row of a query result, with custom manipulation of data | View | View | View | View | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Repeating template chunks with grouping ViewViewViewViewViewViewViewViewViewViewViewView
Both Iteration and CompositionViewPlainFancyPlain FancyPlain Fancy AbsoluteViewOuter IncludedOuter IncludedViewViewViewViewView
Using ListBuilder
Forms
Using the Form Manager.ViewViewViewViewViewSimpleGriddedSimple GriddedSimple GriddedViewViewViewViewViewViewViewInline Error MessageSitewide Error PageValid RequestViewViewViewViewViewViewViewViewViewSubmit ConfirmSubmit ConfirmViewViewViewViewViewViewViewViewView
|