comparison pspx.html @ 11:8037bad7d5a8 draft

Update documentation, fix some #forward bugs.
author David Barts <n5jrn@me.com>
date Wed, 15 May 2019 00:00:45 -0700
parents 75e375b1976a
children 336bc2f622e4
comparison
equal deleted inserted replaced
10:84998cd4e123 11:8037bad7d5a8
16 <p>The header is optional and consists of lines starting with an octothorpe 16 <p>The header is optional and consists of lines starting with an octothorpe
17 (#) character. With the exception of the <code>#rem </code>header, all 17 (#) character. With the exception of the <code>#rem </code>header, all
18 header lines may appear only once in a given file.</p> 18 header lines may appear only once in a given file.</p>
19 <dl> 19 <dl>
20 <dt><code>#end</code></dt> 20 <dt><code>#end</code></dt>
21 <dd>Marks the last line of the headers. Needed only for templating 21 <dd>Marks the last line of the headers. Since the end of the header lines
22 languages where lines often start with <var>#</var>, such as Cheetah.</dd> 22 is implicitly marked by the first line that does not start with <var>#</var>,
23 this is needed only for templating languages where lines often start
24 with <var>#</var>, such as Cheetah.</dd>
23 <dt><code>#errors</code></dt> 25 <dt><code>#errors</code></dt>
24 <dd>This is an error page which handles the specified HTTP error codes. 26 <dd>This is an error page which handles the specified HTTP error codes.
25 See the subsection on error pages below. </dd> 27 See the subsection on error pages below. </dd>
26 <dt><code>#forward</code></dt> 28 <dt><code>#forward</code></dt>
27 <dd>Ignore everything else in this template (and any code-behind 29 <dd>Ignore everything else in this template (and any code-behind
72 <p>Code-behind is optional for both normal and error page templates. If 74 <p>Code-behind is optional for both normal and error page templates. If
73 code-behind is not provided, TinCan will use the <var>Page</var> or <var>ErrorPage</var> 75 code-behind is not provided, TinCan will use the <var>Page</var> or <var>ErrorPage</var>
74 class as appropriate. </p> 76 class as appropriate. </p>
75 <h2>The Body</h2> 77 <h2>The Body</h2>
76 <p>The body begins with the first line that <em>does not</em> start with <code>#</code> 78 <p>The body begins with the first line that <em>does not</em> start with <code>#</code>
77 and has the exact same syntax that the templates are in for this webapp. 79 (or the first line after the <code>#end</code> directive, whichever comes
78 By default, Chameleon templates are used. Cheetah, Jinja2, Mako, and 80 first) and has the exact same syntax that the templates are in for this
79 Bottle SimpleTemplate templates are also supported, provided the webapp 81 webapp. By default, Chameleon templates are used. Cheetah, Jinja2, Mako,
80 was launched to use them. (Only one template style per webapp is 82 and Bottle SimpleTemplate templates are also supported, provided the
83 webapp was launched to use them. (Only one template style per webapp is
81 supported.)</p> 84 supported.)</p>
82 <p>In order to make line numbers match file line numbers for reported 85 <p>In order to make line numbers match file line numbers for reported
83 errors, the template engine will be passed a blank line for each header 86 errors, the template engine will be passed a blank line for each header
84 line encountered. TinCan will strip out all leading blank lines when 87 line encountered. TinCan will strip out all leading blank lines when
85 rendering its responses.</p> 88 rendering its responses.</p>