## Imbedding
(inner)
GOD
(block ImbTest "inner")
#EXPAND
function tplImbTest( $inner ) {
echo '',$inner.'';
}
function tplImbTest2( ) {
echo tplImbTest( 'GOD' ), tplImbTest( 'inner' );
}
##variable arguments and arrays
(.arg1)
(.arr1.val1)
#EXPAND
function tplArgTest( $arg1, $arr1 ) {
echo $arg1, '
', $arg1['val1'], '
';
}
##session, request, get, post
(s.foo)
(r.foo)
(g.foo)
(p.foo)
function tplGlobTest() {
echo $_SESSION['foo'], '
',
$_REQUEST['foo'], '
',
$_GET['foo'],
,
$_POST['foo'],
;
}
#iteration
(every .arr as .o)
(.o)
(end)
#EXPAND
function tplIterTest($arr) {
foreach( $arr as $o ) {
echo '', $o, '';
}
}
##conditional
(cond (.o > 0) && (have s.z)
foo
(end)
# EXPAND
function tplCondTest() {
if( ($o > 0) && isset($_SESSION['z']) ) {
echo 'foo';
}
}