2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

02_FTUISRV: doc change on ftui-if

git-svn-id: https://svn.fhem.de/fhem/trunk@13528 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
viegener 2017-02-26 12:45:35 +00:00
parent 2b7406a78d
commit b65d48d5a7
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- update: 02_FTUISRV: doc change on ftui-if
- feature: 50_TelegramBot: Secured: api key handled in setkey/getkey
msgChatId with peer / communication with TBot_List
- update: 98_DOIFtools: add a possibility to set the attribute icon for DOIF

View File

@ -71,9 +71,9 @@
# add new attribute for defining special template urls templateFiles
# allow spaces around = and after <? for more tolerance
# do not require space at end of tag before ?> for more tolerance
# more tolerance on spaces around =
#
# doc change on ftui-if
#
################################################################
#TODO:
@ -719,6 +719,7 @@ sub FTUISRV_handleIf( $$$ ) {
Log3 $name, 4, "$name: FTUISRV_handleIf expr elements :".scalar(@a).":";
Log3 $name, 4, "$name: FTUISRV_handleIf expr after setmagic :".$expr.":";
}
#Debug "Expr : ".( ( $expr ) ? $then : $else ).":";
# put then/else depending on expr
$done .= ( ( $expr ) ? $then : $else );
@ -1136,9 +1137,12 @@ sub FTUISRV_BinaryFileRead($) {
</li><br>
<li><code>&lt;?ftui-if=( expression ) ?&gt; ... [ &lt;?ftui-else ?&gt; ... ] &lt;?ftui-endif ?&gt; </code> <br>
IF statement: Allow the inclusion of a block depending on an expression that might again include also variables and expressions in fhem. The else block is optional and can contain a block that is included if the expression is not evaluated to true.
IF statement: Allow the inclusion of a block depending on an expression that might again include also variables and expressions in fhem. The else block is optional and can contain a block that is included if the expression is empty or 0 .
<br>
Example: <code>&lt;?ftui-if=( [tempdevice:batteryok] ) ?&gt; ... &lt;?ftui-else ?&gt; ... &lt;?ftui-endif ?&gt; </code>
<br>
Note: The expression is not automatically evaluated in perl, if this is needed there should be the set-logic for perl expressions being used
Example: <code>&lt;?ftui-if=( {( ReadingsVal("tempdevice","batteryok","") eq "ok" )} ) ?&gt; ... &lt;?ftui-else ?&gt; ... &lt;?ftui-endif ?&gt; </code>
</li><br>
<li><code>&lt;?ftui-loopinc="name" loopvariable=( loop-expression ) varname1="content1" ... varnameN="contentN" ?&gt;</code> <br>