Needs review
Project:
Geofield
Version:
8.x-1.55
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Oct 2023 at 19:19 UTC
Updated:
20 Oct 2023 at 19:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
itamair commented@fehin ... it looks to me that this previous existing issue (yet containing both "proximity" and "filter" in its title) would help you with the proper approach: https://www.drupal.org/project/geofield/issues/3211644
And more specifically this comment of mine should redirect to the parent one: https://www.drupal.org/project/geofield/issues/3211644#comment-14091046
It looks to me you should apply the same approach described there but at the user entity (instead of the node one).
And it looks the views_argument_token has now direct support for Drupal 10 ...
All sufficiently clear on this?
Comment #3
fehin commentedThank you for your response. I have tried the Views Token module, but I don't know how to use it. I have a "user ID" contextual filter that I use to exclude the current user from the search result. If I add the Geofield proximity and use a token for the default value, how do I set up the URL for this second contextual filter? I currently have my URL like this
user/%user/profile-search. Do I need to add anything to the URL for the Geofield proximity token to work? Also, I noticed the distance is added to the token ([user:field_user_geofield:lat],[user:field_user_geofield:lon]<=25mi) but I want to expose the distance so people can adjust it to their preference.I have attached images of how I currently have my views set up. It does not work properly, it returns all users, even those without Geofield.