Skip Navigation

[Resolved] Show all entries on map but use pagination

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.

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 6 replies, has 3 voices.

Last updated by Minesh 6 months, 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#2701998

Hi,

I have the same problem as described here: https://toolset.com/forums/topic/show-all-entries-on-map-and-in-filter/
I have a map on which I want to show all available markers at the start.
If user put some search criteria I want markers on map to be filtered as well as View output.
I don't want to turn of pagination as plan to put 4digits number of posts with markers.

In mentioned post, there was explained how to show all markers on the map and paginate as well but there was not explained how to refresh map when using two views.

On the other hand, how to do such: user scrolls the map to some location and View output (with markers as well) updates to show only markers available at that location?

Can you give me some hints?
Thank you!

#2702130

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

I don't have details of exactly what you have done, but I can guess what the problem might be. If I'm wrong, please let us know and we can take a closer look at the specifics of your site.

Displaying all results on a map while showing a paginated list of posts requires two separate queries, so two Views. If you have search filters which both the map and list of posts should respond to, you can set up both Views to respond to the same filters, but you must choose that the View results are updated via a page refresh. You cannot choose ajax, as the second View won't respond.

Regarding your last point, I think you are asking that if users interact with the map this feeds back to affect the list of posts. That's not possible, I'm afraid, the direction is from the posts to the map, not the reverse.

#2703501

CAn you tell me how to set two views to use the same search criteria?

#2703504

I found a topic where you explained it.
https://toolset.com/forums/topic/update-view-data-using-a-search-from-another-view/

But in first View I have filter for.ex: Filter based on the frontend search filter by Something.
I can't set such up in second view.

#2703548

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

One of your Views will include the front-end filter controls. These operate via url parameters. (Test using the filter controls from the front end and you will see the page update with the filter values specified as url parameters.)

The second View should add Query Filters (essentially the same thing, but without generating the front end filter control) for the same fields, and specify that the value comes from the url parameters added by the first View.

(If working with the View block you add Query Filters under the Content Selection settings for the View block in the sidebar.)

Does that make sense?

#2703584

I found it but still not sure how should I copy Query Filter which in first view is like "Filter based on the frontend search filter by Something".

#2703614

Minesh
Supporter

Languages: English (English )

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

Well - you should try to add the "Query Filter" from your "Query Filter" section and try to add the desired filter to it.

Please check the following Doc:
- https://toolset.com/documentation/legacy-features/views-plugin/#filtering-queries

If you do not see the "Query Filter" section on your edit view page then you should click on the "Screen Options" tab available at top right and select the checkbox "Query Filter" that will enable the query filter section for your view.