Can I get a value in a node field in code? I want to use that code to make a decision on how to render an image or to determine which image will be displayed.
Using tokens doesn't work. I tried token_replace and token_scan, but they don't work. The $node variable is not available. $entity doesn't seem to contain node field data and I am not able to create a fully populated node.
I figured it out. I was making a syntax error while accessing $entity. I found it using Devel.