From 1619126d7d87538082dd58645a37f528adb1deeb Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Fri, 23 Sep 2011 22:24:16 +0200 Subject: Added short syntag for comparison. ~{a|op|b} Also updated the documentation and made unescape_text() a alias of PHP's stripcslashes(). --- docu/language_definition.html | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'docu') 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 @@ -163,23 +163,29 @@ Text elements More info: short if-clause + + \~ + ~ + Text elements + More info: short comparasions + \{ { Text elements - More info: short if-clause + More info: short if-clause, short comparasions \} } Text elements - More info: short if-clause + More info: short if-clause, short comparasions \| | Text elements - More info: short if-clause + More info: short if-clause, short comparasions \\ @@ -277,6 +283,14 @@ ]]> If the variable foo has the content bar, :-) will be returned, :-( otherwise.

+

Short syntax for if-clause

+

Because comparisons are used often, there is an short syntax:

+

~{a|operator|b}

+

This is equavilent to:

+

]]>

+

~, {, | and } can be escaped

+

Because this is implemented as a simple substitution, you can only use Text and Variables. And " must be escaped.

+

WARNING: short comparasions can not be nested! They can be inside short if-clauses, but not the other way around!

ste:not

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.

-- cgit v1.2.3-70-g09d2