Drupal Association members fund grants that make connections all over the world.
Hi Drupal folks!
Please bear with my explanation, I'll try to make it easy to follow.
I'm hoping this is easy, but I'm looking for a way to display some fields within a block IF content in a field of the node matches the content in a field for a different node of a different Content Type.
In case that sounds confusing, here's an example. Let's say we have Content Types "Fruit" and "Vegetable", and within each Content Type we have a field "Color".
Now let's say I have a node within Fruit called "Granny Smith Apple" and it's Color field says "Green". In the "Vegetable" Content Type I have a node "Celery" and it's "Color" field also says "Green."
So when someone is looking at the "Granny Smith Apple" node, I want a block to show "Celery, Green". Formatting doesn't really matter (i.e. comma vs hyphen for example) but I want the information there. If there is more than one match, then I'd want both to show. For example, both "Celery, Green" and "Lettuce, Green" might appear.
Any easy PHP code to make that happen?