Hi,
I am using SimpleSearch and want to put a plural filter on the results message so that it correctly reports "1 Result found..." and "2 Results found...". The message can be modified in the lexicon under the sisea.results_found entry. By default, the message is set to:
[[+count]] Results found for "[[+text]]"
My plan was to change it to this:
[[+count:pluralFilter='Result']] found for "[[+text]]"
and use this snippet as the custom filter:
<?php
$output = $input . " " . $options; //where $input is the value of [[+count]], $options is "Result"
if ($input > 1) $output .= "s";
return $output;
For some reason $input is empty inside the snippet, so I get a message like this for all search results:
Result found for "search term"
$options is passed correctly to the flter snippet but I can’t figure out why the value for [[+count]] isn’t. Any suggestions much appreciated.
Rev 2.05