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 noticed this module does not work well together with the module views_customfield. I have tried to add the token value [phpcode] to the row class attributes (at style options), but then the row class just becomes [phpcode] instead of the value of the field.
I have taken a look at the code and noticed when semanticviews_get_token_replacements() got called, $row does not contain the value result of the field phpcode. So I'm not sure whether this is a Semantic Views issue or a Views Custom Field issue, but I think this is a Semantic Views issue.
Comments
Comment #1
milos.kroulik CreditAttribution: milos.kroulik commented+1
Comment #2
TimG1 CreditAttribution: TimG1 commented+1 subscribing.
Comment #3
ahallez CreditAttribution: ahallez commented+1 subscribing
Comment #4
sarhugo CreditAttribution: sarhugo commented+1 subscribing
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedI am happy to review a patch, but I will not be making one myself. I don't use PHP custom fields. Anytime I need to do something like this, I implement a field theme function or write a views hook (like pre_render).
Do PHP custom fields work as tokens in other field output? For instance, when you rewrite the output of a later field, can you use the token output of the PHP custom field?
Comment #6
nicholasThompsonI have been trying to get the tokens working and, although I also could not get [phpcode] working, I have noticed that it seems to be "excluded" fields don't get replaced.
Apparently, if a field is excluded from output we cannot use it's token as a replacement in a Semantic View style (eg, for a row)...
Comment #7
oferrero CreditAttribution: oferrero commented+1 ... Would be nice to have this functionality.
Comment #8
Scyther CreditAttribution: Scyther commented