Hi Everyone.
I need help to paginate search results generated from a search form.
my search result url:
http://mysite.com/search/?products=tshirt&size=xl
how do I keep the value when generating pagination using MarkupPagerNav?
like on SKyscrapers example:
http://processwire.com/skyscrapers/search/page2?city=albuquerque
(tried to look at the source code but can't find where Ryan set the pagination options, maybe I missed it? can someone point it out to me )
at the moment my pagination link only showing the page number without the get value i.e:
http://mysite.com/search/page2
however, it showing correct results if I type the url manually like:
http://mysite.com/search/page2?products=tshirt&size=xl
I'm assuming I need to set the getVars in the pagination options
can you give me example how to use the "getVars"? I've set the cache to 0 in the template setting.
my code:
$pagination = $matches->renderPager(array(
'nextItemLabel' => "»",
'previousItemLabel' => "«",
'listMarkup' => "<ul class='MarkupPagerNav pagination'>{out}</ul>",
));
thank you!