Skip Navigation

[Closed] Toolset Map – Random entries on load, paginated results after submit

This support ticket is created 4 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 18 replies, has 2 voices.

Last updated by Shane 4 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1722039

Tell us what you are trying to do?
I currently have a map that shows a paginated list of entries on page load. I would like to change the view so on Page Load the map shows a set number of random entries. Once the user presses submit on a search it displays the results in a paginated form.

ON LOAD
Map
Search Bar
Random List of entries from directory

ON SUBMIT
Map
Search Bar (with search parameters)
Paginated List of results

What is the link to your site?
hidden link

#1722087

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Susan,

Thank you for getting in touch.

Perhaps i'm missing something but this is how the map is currently working. On the page load it shows the entire list of markers and filters to the relevant markers once the user performs a search.

Thanks,
Shane

#1722095

Hi Shane,

"Perhaps i'm missing something but this is how the map is currently working. On the page load it shows the entire list of markers and filters to the relevant markers once the user performs a search."

Yes that is how it is working now. How I would like it to work is on initial page load and before a search is performed it shows a random list of say 20 of the directory entries. Once a search is actually performed the page will show the requested results in paginated form.

I hope that makes it clear.

#1722135

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Susan,

Ok thank you for the clarity. It seems that you have made some changes to your map settings as this could be why your other markers are not showing.

When I click next on the pagination all 20 items show up. Do all the posts on the initial page have an address added?

If they don't have an address added then there won't be any marker related to that post on the map.

Thanks,
Shane

#1722193

Hi Shane,

Perhaps I am not explaining myself correctly. I do not have an issue with the makers showing up. All of my entries have addresses and the markers show up correctly when they are the result of the search.

I think this might help explain what I am trying to do. Let's act like there are 3 pages.

Page #1:
I would like to display 20 random entries from my map

Page #2:
I would like to display the first 20 alphabetical entries on my map. (This is what I currently have).

Page #3:
When this page loads, and before any search has been performed, I would like to display the map and entries like I have on Page #1. Once someone searches for something, I would like to display the map and results like Page #2.

Thanks,
Susan

#1722945

Hi Shane,

Let's look at this a different way.

I have a Many-to-One relationship. The parent is Domaines and the children are Labels. I have a view that view with a map, pagination and search. If I do a search for say the name of one of the children (Labels) currently it will only return the entry for the child (Label). I would like it to to show the the parent instead.

You can see what I mean if you go to this page: hidden link
Enter this into the search box (this is a child entry) : AKHASHENI (2015)
It returns the entry for just the AKHASHENI (2015). I would like it to return the parent of that entry instead.

I have created an admin account in case you need to look at the views or anything else.

#1722975

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Susan,

I took a read of your further explanation.

Unfortunately this isn't possible to achieve. The reason is because the map is directly tied to what your view is currently displaying as its results.

So there isn't a way to let the map display random markers from the view when that addressed item isn't being actively displayed on the page.

The only thing that is possible to achieve is what you have now where the Map is directly displaying the markers of the items from the view.

Also I've removed your credentials from the previous post as it was being displayed publicly and not in a private field

Thanks,
Shane

#1722977

Hi Shane,

Ok I can understand the map display issue. Thank you.

What if I removed the map? If I just had the search functionality. I enter a child into the search field and want the results to show the Child and the Parent of that child. Is that possible?

Thanks,
Susan

#1723013

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Susan,

In a case like this your view is built to list out the child posts. Is it that you want to just search for the parent using the Child and not have your view display anything about that child ?

We can have this setup but you will need to tell your view to display the parent field rather than the current child. The main issue is that we can have duplicates in the results.

This means that anything that you're searching for if they have a shared parent then this parent will be listed twice.

Thanks,
Shane

#1723033

Hi Shane,

"In a case like this your view is built to list out the child posts. Is it that you want to just search for the parent using the Child and not have your view display anything about that child ?" - Yes that sounds like what I want. I want people to be able to enter the Child or the Parent into the search and the result only displays the Parent.

"We can have this setup but you will need to tell your view to display the parent field rather than the current child. The main issue is that we can have duplicates in the results." - If I can get the view to work this way then I can work with the duplicates.

I have changed the password for the admin account. If you tell me how to send it privately I will send it over.

Thanks,
Susan

#1723097

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Susan,

Here are the private fields.

Thanks,
Shane

#1723863

Hi Shane,

I was wondering if I might be able to get a suggestion on the above?

Just to be clear. My search currently displays Parent and Child. If I enter a Child into the search it will display that Child. If I enter a Parent into the search it will display that Parent.

What I would like to happen:
If I enter a Child into the search it will display the Parent.
If I enter a Parent it will display the Parent.

IF the above is not possible, is there a way to get it so when I enter a Child into the search it show both the Child and the Parent entries? Right now if I enter a Child it only shows the Child entry not the Child and Parent.

I am under a bit of a time crunch (of course lol) so anything you can do to make this work would be really appreciated it.

#1724069

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Susan,

What I would like to happen:
If I enter a Child into the search it will display the Parent.
If I enter a Parent it will display the Parent.

So given that you have your view displaying both Parent and Child, there is no way to display only the parent, unless I set the view to only display the child and in that view I call the fields from the parent like this

[wpv-post-link item="@domaine-label.parent"]

However in a case like this where we use the child and call its parent's values instead we will get duplicate entries but this is the actual solution to your case.

Thanks,
Shane

#1724097

Hi Shane,

Thank you I will give that a try. I have a question though. Because I am displaying both Parent and Child, when I enter the name of the Child, shouldn't it return the Child result and the Parent result? Right now if I enter the Child it will only return the Child result.

Thanks,
Susan

#1724103

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Susan,

It won't if the field you are filtering by is not on the Parent post. If the filter you are using only applies to the child then only the child will display.

This is because you are not able to filter the Parent itself by the child field.

Thanks
Shane

The topic ‘[Closed] Toolset Map – Random entries on load, paginated results after submit’ is closed to new replies.