summaryrefslogtreecommitdiff
path: root/docu/language_definition.html
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2011-09-23 22:24:16 +0200
committerKevin Chabowski <kevin@kch42.de>2011-09-23 22:24:16 +0200
commit1619126d7d87538082dd58645a37f528adb1deeb (patch)
tree33a96610937ca591fa5bcac5aef556b8b2300c02 /docu/language_definition.html
parentbc0ea34989618d8747076c322c14d0cd6af591b2 (diff)
downloadste-1619126d7d87538082dd58645a37f528adb1deeb.tar.gz
ste-1619126d7d87538082dd58645a37f528adb1deeb.tar.bz2
ste-1619126d7d87538082dd58645a37f528adb1deeb.zip
Added short syntag for comparison.
~{a|op|b} Also updated the documentation and made unescape_text() a alias of PHP's stripcslashes().
Diffstat (limited to 'docu/language_definition.html')
-rw-r--r--docu/language_definition.html20
1 files changed, 17 insertions, 3 deletions
diff --git a/docu/language_definition.html b/docu/language_definition.html
index 58d2abd..f4bbf52 100644
--- a/docu/language_definition.html
+++ b/docu/language_definition.html
@@ -164,22 +164,28 @@
<td>More info: <a href="#builtin_if_short">short if-clause</a></td>
</tr>
<tr>
+ <td>\~</td>
+ <td>~</td>
+ <td><a href="#basic_elems_text">Text elements</a></td>
+ <td>More info: <a href="#builtin_if_short">short comparasions</a></td>
+ </tr>
+ <tr>
<td>\{</td>
<td>{</td>
<td><a href="#basic_elems_text">Text elements</a></td>
- <td>More info: <a href="#builtin_if_short">short if-clause</a></td>
+ <td>More info: <a href="#builtin_if_short">short if-clause</a>, <a href="#builtin_if_short">short comparasions</a></td>
</tr>
<tr>
<td>\}</td>
<td>}</td>
<td><a href="#basic_elems_text">Text elements</a></td>
- <td>More info: <a href="#builtin_if_short">short if-clause</a></td>
+ <td>More info: <a href="#builtin_if_short">short if-clause</a>, <a href="#builtin_if_short">short comparasions</a></td>
</tr>
<tr>
<td>\|</td>
<td>|</td>
<td><a href="#basic_elems_text">Text elements</a></td>
- <td>More info: <a href="#builtin_if_short">short if-clause</a></td>
+ <td>More info: <a href="#builtin_if_short">short if-clause</a>, <a href="#builtin_if_short">short comparasions</a></td>
</tr>
<tr>
<td>\\</td>
@@ -277,6 +283,14 @@
</ste:if>]]></pre></code>
If the variable <code>foo</code> has the content <code>bar</code>, <code>:-)</code> will be returned, <code>:-(</code> otherwise.
</p>
+ <h4 id="builtin_cmp_short">Short syntax for if-clause</h4>
+ <p>Because comparisons are used often, there is an short syntax:</p>
+ <p><code>~{a|operator|b}</code></p>
+ <p>This is equavilent to:</p>
+ <p><code><![CDATA[<ste:cmp text_a="a" op="operator" text_b="b" />]]></code></p>
+ <p><code>~</code>, <code>{</code>, <code>|</code> and <code>}</code> can be <a href="#escaping">escaped</a></p>
+ <p>Because this is implemented as a simple substitution, you can only use <a href="#basic_elems_text">Text</a> and <a href="#basic_elems_variable">Variables</a>. And <code>"</code> must be escaped.</p>
+ <p><strong>WARNING:</strong> short comparasions can not be nested! They can be inside <a href="#builtin_if_short">short if-clauses</a>, but not the other way around!</p>
<h3 id="builtin_not">ste:not</h3>
<p>The ste:not Tag will logically invert its content. If it is an empty text (i.e. false), it will return a non-empty text (i.e. true) and vice versa.</p>