]> WPIA git - gigi.git/blobdiff - doc/TemplateSyntax.txt
ADD: If-else documentation
[gigi.git] / doc / TemplateSyntax.txt
index c399d7eb285968735c439d45a4ac23bd59fce755..75a42b2b247f5360dc6d8b1d931503af163d9fa2 100644 (file)
@@ -14,10 +14,11 @@ A template is constructed from a charstream. Everything that is not in "<?" to "
 - <?=s,"some data",My %s text?> will insert "some data" into the translated text
 - <?=s,!"some data",My %s text?> will insert "some data" into the translated text literally (not HTML-escaped)
   
-- <? if($variable) { ?>
+- <? if($variable) { ?> ... <? } ?>
   Output/execute the text until "<? } ?>" only if $variable is Boolean.TRUE (<=> !Boolean.FALSE) or not null. 
-  
-- <? foreach($variable) { ?>
+- <? if(...) { ?> ... <? } else { ?> ... <? } ?>
+
+- <? foreach($variable) { ?> ... <? } ?>
   If $variable is an "IterableDataset"
   Output/execute the text until "<? } ?>" repeated as $variable suggests. 
   Special variables that $variable defines can be used in the inner text.