Skip Navigation

[Resolved] Show all entries on map but text entries below with infinite scrolling

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 8 months, 1 week ago.

Assisted by: Minesh.

Author
Posts
#2688209

Tell us what you are trying to do?

I have 40 results to be shown from a custom post type in a view: they're shown as 40 map markers and 50 text entries below it. I only want 10 text entries to be shown below the map while the map marker shows all 40. The next 10 are then loaded through the infinite scrolling option.

Similarly for a filter, I filter by a country and 20 results apply to that country. I want all 20 to be shown on the map but only 10 text entries below, and the next 10 load through infinite scroll.

Is there any documentation that you are following?

I tried the recommendations here (https://toolset.com/forums/topic/is-it-possible-to-show-all-entries-on-map-but-the-entries-below-are-paginated/)

View 1 has the text entries, search filters and pagination
View 2 has only map and markers

I want the filter in view 1 to apply to view 2 as well. Both view shortcodes are placed on one page.
I was able to get it working but only with full page refresh and not through ajax.

If I use ajax in those steps, the text entries get filtered but the map doesn't. Is there a way to load the map through ajax which filters by country and shows all markers?

What is the link to your site?
Currently on localhost, but you can see a live example here (hidden link) where there are around 40 map markers and all entries are shown below the map. I'd like to just show a few text entries (10) and have infinite scroll for the next 10 while the map should show all 40. Similarly for filters.

#2688420

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I would say you will have to compromise at some point as you have specific requirement.

We can update the view results based on the another view's filter while using the non ajax view. So based on URL param we can get the value of filter and filter the another view result.

If you are ok with that - can you please share problem URL and admin access details and let me check whats could be the possible solution. Please share problem URL and admin access details and once I review your setup I will be able to guide you in the right direction.

Please share all required information like what filters you want to apply.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2688483

I am able to do that with two non-ajax views. But updating a page with a dropdown filter in 2024 using a full page reload doesn't feel right.

I'm looking for a way to get the filtering working with ajax. The Toolset forum post which had the steps for it was from almost 5 years ago which suggested the method without ajax. There is still no way to have two views gets filtered together on a page with ajax instead of a full page reload?

Page contents:
- [view 2] (has only map and markers)
- [view 1] (has the text entries, search filters and pagination)

If I use ajax on the two views:
On the page which has both the views, the text entries in [view 1] are getting filtered with ajax but the map in [view 2] doesn't get filtered. I was hoping that after the [view 1] text entries are filtered with ajax, I could pass on some filter params/data to a function that filters the map with ajax. Is there such a function in the API or something close to it that I could build on, which filters the map with ajax when called?

#2688542

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I'm looking for a way to get the filtering working with ajax. The Toolset forum post which had the steps for it was from almost 5 years ago which suggested the method without ajax. There is still no way to have two views gets filtered together on a page with ajax instead of a full page reload?
===>
Unfortunately no - as the filter is bind to the view where the filter is added and based on the filter it will update the result. So when using ajax as filter is added to view 1 - it will only update the results on view 1 based on the selected filter. But if we use non ajax - we have luxury to access the URL param and based on URL param value we can filter the view 2 results or filter the map results.