diff options
| author | Kevin Chabowski <kevin@kch42.de> | 2013-10-28 18:09:50 +0100 | 
|---|---|---|
| committer | Kevin Chabowski <kevin@kch42.de> | 2013-10-28 18:09:50 +0100 | 
| commit | a77a2ec58947f5fc7cb4023db3b8f8298e2f01f2 (patch) | |
| tree | 0aa5a38a23f8afc49c4c8bc50ad5edd51f4897d2 /docu/language_definition.html | |
| parent | 55d47c27247e3cdbd88818c0ba98646ee11fb315 (diff) | |
| download | ste-a77a2ec58947f5fc7cb4023db3b8f8298e2f01f2.tar.gz ste-a77a2ec58947f5fc7cb4023db3b8f8298e2f01f2.tar.bz2 ste-a77a2ec58947f5fc7cb4023db3b8f8298e2f01f2.zip | |
ste:foreach now has an else clause for empty arrays.
Diffstat (limited to 'docu/language_definition.html')
| -rw-r--r-- | docu/language_definition.html | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/docu/language_definition.html b/docu/language_definition.html index a21a869..84232de 100644 --- a/docu/language_definition.html +++ b/docu/language_definition.html @@ -380,6 +380,14 @@  <code><pre><ste:foreach array="foo" key="k" value="v" counter="i"><br />	Number: $i<br /><br />	Key: $k<br /><br />	Value: $v<br /><br />	<br /><br /></ste:foreach></pre></code>  				This code will loop through the array <code>foo</code> and return the counter <code>$i</code>, the key <code>$k</code> and the value <code>$v</code> of the current iteration.  			</p> +			<p> +				There can also be an optional <code><ste:else></code> clause, that will be executed, if the input array was empty. +			</p> +			<p> +				Example:<br /> +				<code><pre><ste:foreach array="foo" value="v"><br />    <p>$v</p><br />    <ste:else><br />        Array \$foo is empty.<br />    </ste:else><br /></ste:foreach></pre></code> +				This code will list all array elements or will display <code>Array $foo is empty</code> if the array <code>$foo</code> is empty. +			</p>  		<h3 id="builtin_infloop">ste:infloop</h3>  			<p>Creates an infinitive loop. You can get out of the loop using the <a href="#builtin_break">ste:break</a> tag. Can be used to emulate other loop constructs like while loops.</p> | 
