Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to rewrite the output of the views field used for dynamic styles but whatever I do, the overwrite is ignored and the original field value is used.
This is the case for both Style field in Openlayers data overlay settings and dynamic variable used in styles path ${field_my_field}
Not sure if this is the right way of doing it so this may as well be a support request.
Is there any way to override the value of the field used to generate path to cusom marker?
Comments
Comment #1
azuledu CreditAttribution: azuledu commentedTo create a dynamic style with a custom marker based on a field you just to create a OL style with the 'externalGraphic' property equal to something like sites/all/themes/yourtheme/images/${field_my_field}.png
I don't know if this is your question.
Comment #2
roman_pro CreditAttribution: roman_pro commentedThe suggested method only works when you use the actual field value in your style. The problem is that I need to calculate this value using php.
Comment #3
azuledu CreditAttribution: azuledu commentedMaybe you can use a computed field before using the field.
Comment #4
PolHi,
Is it also doing the problem with beta9 ?
I did a lot of change in the way fields are displayed and I think it's much better.
Could you test with beta9 and if it's not working, tell us the steps to reproduce the problem ?
Comment #5
PolHi,
I've finally made quite a lot of changes in the styling of the feature this morning.
Could you check the 7.x-2.x version and let me know ?
Comment #6
Pol