Closed (fixed)
Project:
Views PHP
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2011 at 09:13 UTC
Updated:
24 Feb 2022 at 17:49 UTC
Jump to comment: Most recent
Comments
Comment #1
johnvSo, if Image exists, the Body is hidden?
Haven't tried this, but one of these approached could work:
- create a new field 'Global PHP';
- You may need to set Image field to 'exclude from display';
- set the PHP-code to:
return ($data->field_image[0]['und']['value']) ? NULL : $data->field_body[0]['und']['value'];or:
- create a new field 'Global PHP';
- You may need to rearrage this field to be before or after Image field;
- in the PHP-code, clear $data->field_body[0]['und']['value'] when isset(Image) = TRUE;
Comment #2
liam morlandIf you need further help, please re-open and provide details.