Re: total number of search results (prior to pagination)?
Reply #1 – May 17, 2017, 08:55:41 am
emanuele
Global Moderator
I guess you want it in the template, right? It is not passed there. With some tricks you could extract an approximation from the paginations, but to get the exact number of results, you have to edit Search.controller.php and assign the value of $num_results to an index in $context.
Re: total number of search results (prior to pagination)?
Reply #6 – May 18, 2017, 04:58:34 am
emanuele
Global Moderator
Search is Spuds' domain. xD
Re: total number of search results (prior to pagination)?
Reply #9 – May 19, 2017, 02:01:10 pm
Good stuff ... I think adding Structured Data would be a very good thing to do in 2.0. I've dabbled with it, but only using ld+json output in the templates, and then only for the topic listing, never considered getting in to the other templates such as search. What is the benefit of using it on the search page (honest question).
Re: total number of search results (prior to pagination)?
Reply #14 – May 20, 2017, 12:26:28 pm
emanuele
Global Moderator
Blame me for looking at 1.1 code instead of 1.0... sorry for the noise. xD