Skip Navigation

[Resolved] Display grandparent fields in a map marker

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)

This topic contains 18 replies, has 2 voices.

Last updated by Arno 1 year, 11 months ago.

Assisted by: Shane.

Author
Posts
#2364695

Shane
Supporter

Languages: English (English )

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

Hi Arno,

Happy to see that the issue with the map has now been resolved.
If I was programming this, I'd have an array/collection of processed Location IDs while looping through them. On each Location I'd check the collection and skip the Location if its ID was already in the collection. I don't have enough Toolset experience to understand if something like that is possible.

We are limited in what we can do with the Toolset UI to achieve the above scenario. It would be as simple as you describe it with a few lines of code but since you're working without applying any custom code then to identify some uniqueness in the relationship isn't possible.

As for your last suggestion, to only display 1 item: I don't fully understand the approach yet, but what I can say is that in this scenario we do have only 1 Location per Town.

I was mentioning here that you can have your view list out only 1 item because there is a limit and offset setting on your view that will allow you view to display only 1 item in the loop. This means that if the post has 5 parents/children then the view will only display 1 item instead of the 5 because there is a limit setting being applied to the view.

If you say only one location has this checked then maybe you can apply the code in the view that is displaying the location.
[wpv-conditional if=" '[types field='main-town-location' output='raw'][/types]' eq '1' "]

SO it will only display that location.

Please let me know if this helps.
Thanks,
Shane

#2365219

Hi Shane,

I looked into this again based on your latest suggestion, but finally decided to take a different approach due to the complexity and time constraints. I removed the map, and instead I added two child views in each loop item to display additional information that would otherwise be in the map. The map will be missing but from a user perspective the view is still good enough.

Thanks for your help,
Arno

#2365445

Shane
Supporter

Languages: English (English )

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

Hi Arno,

Thank you for the update.

I must apologize that I wasn't able to assist you with this limitation.

If there are no further questions on this one then you can go ahead and mark this ticket as resolved.

Thanks,
Shane

#2365619

No problem Shane. Thank you for helping out. I did learn something 🙂

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.