Hi,
I’m having issues using EE’s Pro Search, and I am trying to display the results for the same data using two separate {exp:pro_search:results} loops for different areas of the page.
The loops should return the same results when clicking the pagination, but the first results relating to the first page still remain. It should really display the next ones within the sequence. Does Pro Search have a way of displaying the same results when you cycle through the pagination for two loops? Or is there a conditional or parameter that can help match the results on each paginated page?
Thanks, James
Hi Russ,
Thanks for the reply.
Here are the code examples for both loops below. Everything works OK when you’re on the first results page. When you cycle through the pagination pages, Loop 2 displays the first 10 from the first results page, not the results that are later in the sequence.
Loop #1 – displays the results in a list form
{exp:pro_search:results
limit="10"
channel="properties"
orderby="date"
query="{segment_3}"
}Loop #2 – displays the results in map markers for Google Maps
const locations = [
// match map markers with list view entry display
{exp:low_search:results
query="{segment_3}"
limit="10"
channel="properties"
require_all="category"
}
[{
{property_location}lat: {property_location:latitude}, lng: {property_location:longitude} {/property_location}},
"{property_address}{property_address:address_1}{/property_address} {property_city}"
],
{/exp:low_search:results}
];James
The const locations = [] is the JS array based on the Google Maps Platform to display the object data for each entry or location.
The require_all = attribute has been removed from Loop 2 and have taken it out of the locations array, but it still does the same thing on returning the first 10.
Do you reckon it might be to do with the pagination from Loop 1 not matching with Loop 2?
Possibly… I’m not sure… Did you change the low_search tags to pro_search? I know those are supposed to be aliased in the codebase but when things don’t work as I expect I start by just trying to bring stuff like that into line.
Have you looked at an addon for the Map like Reinos Maps? that is supposed to be good (I haven’t used it) and it Might address the issue you are having…
Hi Russ,
The markup tags have been updated to pro_search but the issue still remains with the pagination results not updating the locations array. I’ll have a look at Reinos Maps to see if it can address the issue.
Thanks for the suggestions and advice on this.
Regards, James
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.