Show referenced nodes as links if they have content in a field Nodes of content type A are attached to nodes of content type B with an entity reference. Im listing Nodes of type A on Node B with a view. 

Now I need the list of Node As to be links if their node's body has content. If their node's body doesnt have content then I need it to not be a link.
This can be done in Views with no PHP or templating. 

Add 2 title fields, one that is a link to the content and one that isnt. 

Exclude both fields from display.

Add a body field and rewrite the output of the field. Use a replacement pattern thats the node title which is a link.

Under no results behavior add the token thats the node title which isnt a link. Make sure 'Hide rewriting if empty' is not checked.