Gween Templates
A template is basically a html oder xhtml page with some extra tags that will be interpreted by Gween. They will be parsed to a component object.
Tags
<& PHP-Expression &>
This block is replaced with the result of evaluating the PHP-Expression
<%> PHP-Code </%>
The Block is treated as PHP-Code.
% PHP-Code
% PHP-Code is a short from of <%> PHP-Code </%>
<table>
% for($i = 0; $i < 10; $i++) {
<tr><td>
Line <& $i &>
</td></tr>
% }
</table>
<%init> PHP-Code </%init>
This block contains the initialization code, it is executed while loading the component. It is intended to initialize variables but should not be used to include or require any code, use the <%shared> block instead.
<%shared> PHP-Code </%shared>
This block is also for initialization code. The main difference to <%init> block is that the code is not executed in the component-object so include and require may be used.
<%doc> Comment </%doc>
<%doc> block contain comments and are ignored.
<%method name="method-name"> Method Definition </%method>
Declares method "method-name" for use in this or other templates.
see Gween Concept
Variables
Note that variables in the PHP-Block are parsed to the $GLOBALS['varname'].
This results in problems when using array in quotation marks so don't use them.
Last modified: Mon Nov 11 22:38:46 CET 2002