Hi, is there a way to output just nothing if no matching document is found?
Thx!
Raven
Yes it is
[tt]&noResults=` `[/tt]
;)
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
Thanks Dimmy, you are right.
In many situations, such as in php, ’’ (two single quotes) following a variable definition indicates that the variable is set to a null value. Of course you can’t pass such a value into a snippet’s script, so that’s why the space is required. Another approach would be to have an &showNoResultsMesssage=`1/0` parameter, which would probably be useful for avoiding any confusion.
Incidentally, the space is effectively ignored in HTML, so the net effect of the above statement with regard to the on-screen display is that nothing will be displayed.
Revo 2.0.8-pl