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 was trying to configure a view based on a checkbox field within a content type. So basically, when the field is checked it should show a different view mode and if unchecked a different one.
I have checked it a lot and found that the reaction is called before the contexts get initiated or loaded. Because of that in reaction execute the function in CVM, it always gets $this->contexts() array empty and fail down to apply the view mode.
Any help would be appreciated!
Comments
Comment #2
JordiTR CreditAttribution: JordiTR commentedI'm having the same trouble here. My impression is one of the main conditions to use that module would be to change view mode based on some value on a field... :-)
Comment #3
math-hew CreditAttribution: math-hew commentedRunning into the exact same issue here.
Comment #4
Yorgg CreditAttribution: Yorgg commentedBump. Trying context_bool_field module
Edit: nor even context_bool_field