So, what is so weird about wanting to show the number of results?
The solution is of course rather simple, like everything is simple in hindsight, but nevertheless it took me hours to come up with it. Mostly because I was googling through endless hits more or less about this problem and maybe I should try to catch some more sleep....
The solution is to lift the value from the GLOBALS array. Add $GLOBALS['pager_total_items'][0] somewhere to a variable in a preprocess hook or simply print in in your template file like thus:
<div class="counter"><?php print $GLOBALS['pager_total_items'][0].' results'; ?></div>
No comments:
Post a Comment