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.
great little module -- it would be fantastic if we could add another condition with an AND... and in my particular case, i need to figure out how to access a field collection field to set as one of the conditional parameters...
Comment | File | Size | Author |
---|---|---|---|
#7 | views_conditional_handler.inc_.txt | 16.86 KB | megaphpdestroyer |
Comments
Comment #1
HeathN CreditAttribution: HeathN commentedThis is a must. AND and OR are very needed. Even just the option to have a regex condition would be fine.
Comment #2
ericwongcm CreditAttribution: ericwongcm commentedI think I might have a use for this feature too..
I am trying to do something like this.
If condition A is meet, then show field X, else if condition B is meet, then show field Y, else blank.
At the moment, I use two views_conditional fields in tandem to achieve this but it looks clumsy.
Comment #3
Christoph K CreditAttribution: Christoph K commentedIs there a known work around to make field collection fields work?
Comment #4
TanvirAhmad CreditAttribution: TanvirAhmad commentedI am also looking for the same thing mentioned in #2.
Comment #5
ofry CreditAttribution: ofry commentedCan you provide patch for it? Or you can connect me in IRC (ofry) or Skype (ofryaka).
Comment #6
NeuQuest CreditAttribution: NeuQuest commentedI agree this would be easier than the way I'm currently handling multiple conditions which is to use multiple fields for my output. I also use field collections and the way I grab one value is to:
a) add the field collection field with "exclude from display" checked
b) the formatter set to "Views field-collection items"
c) in the name field enter the field collection view name
d) in the display id field enter the machine name for the view's display
Comment #7
megaphpdestroyer CreditAttribution: megaphpdestroyer commentedReplace this file with original.
views_conditional/includes/views/handlers/views_conditional_handler.inc
http://i.imgur.com/J7lqelU.png
Comment #8
megaphpdestroyer CreditAttribution: megaphpdestroyer commentedReplace this file with original.
views_conditional/includes/views/handlers/views_conditional_handler.inc
Comment #9
megaphpdestroyer CreditAttribution: megaphpdestroyer commentedComment #10
shelanePatch needs to added with correct “patch” extension for testing. Then the status should be set to “Needs Review.”