- πΊπΈUnited States fehin
I'm trying to do something similar. I want to set the origin coordinates in the proximity filter to the Geofield field from the current user's profile.
How did you use the URL arguments for the exposed filter?
I want to configure proximity filtering to a view based on the context of parent node, but the only way to set a default origin from the geofield is a fixed lat/lng pair entered manually in the view. This makes setting a default origin value too inflexible for a general purpose view. At the moment I am replicating a single view only only to change the origin in the proximity exposed filter. I plan to have hundreds of nodes so a matching number of views is not a good solution.
I am referencing the view from a node as a viewfield which means I have all the context of the node available in the view but I cant use it as there is no way of accessing it from a view and passing it to my filter to dynamically set the proximity origin from the node context.
Create a view of nodes with a geofield and add an exposed proximity filter.
Configure the filter to default to specified value.
Note there is no way to make the value dynamic it has to be hard-coded.
Note that the default value does not support tokens.
Ideally I would like to be able to set the value from a token not only a string: Views|Add filter|geofield proximity|Proximity Definition Mode| Manual Origin|Default. This would save duplicating identical views just to change the origin value.
Closed: works as designed
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I'm trying to do something similar. I want to set the origin coordinates in the proximity filter to the Geofield field from the current user's profile.
How did you use the URL arguments for the exposed filter?