]> WPIA git - gigi.git/commitdiff
ADD: If-else documentation
authorJanis Streib <janis@dogcraft.de>
Wed, 31 Dec 2014 01:24:34 +0000 (02:24 +0100)
committerJanis Streib <janis@dogcraft.de>
Wed, 31 Dec 2014 01:41:06 +0000 (02:41 +0100)
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.