Quote from: JoZ3 at Oct 08, 2010, 02:52 PM
Hi anso, tnx, "===" is allowed check the first example, but I don’t know what happend, when i used in the &input a [[+placeholder]] ve always the same error, i try with [[+placeholder]] other than [[+ gallery.item]] and the result is always the same:
Parse error: syntax error, unexpected '[' in /var/www/hogarama/core/cache/elements/modsnippet/28.include.cache.php(33) : eval()'d code on line 1
what is wrong?
Hi.
There is error in first example. Quote mising around TV pagetitle. Corect code:
[[!ifEval? &input=`stripos("[[*pagetitle]]", "a")===0` &contentTrue=`<h3>Article with first letter A</h3>` &contentFalse=`<h3>Article with first letter different from A</h3>`]]
Anso is half-right

(thx). You don’t need parenthesis around ([[+gallery.id]]===0), and "===" is allowed but not need in this case.
From PHP net: (
http://php.net/manual/en/language.operators.comparison.php)
$a == $b Equal TRUE if $a is equal to $b.
$a === $b Identical TRUE if $a is equal to $b, and they are of the same type. (introduced in PHP 4)
INPUT must be correct PHP expresion (or syntax). In Your case probably [[+gallery.item]] or other placholders is something difreent than number. If You want to do comparison on placholders which may be blank, empty, string, everthing different than numbers You must use quote.
This is righ code I think (if galery with id 0 exist):
[[!ifEval? &input=`"[[+gallery.id]]"==0` &contentTrue=`[[$Rotator]]` &contentFalse=`[[$galProductos]]`]]
For simple comparisons may be better to use IF snippet, ifEval is intended to use with multiple comparasions and others complex operators.