I'm theming the display of user profile information managed by profile2 using a custom template, user-profile.tpl.php. I want to hide specific profile2 fields, and also check the value of others. However, looking at the $user_profile, field values are nested deeply in a profile, under the $pid, so I'm not sure how to cleanly target these in a template. So, my questions:
What is the best way to render a single profile2 field when working in a template?
What is the best way to hide a given profile2 field?
It's easy to hide a profile, or the title for a profile:
hide($user_profile['profile_main']); $user_profile['profile_main']['#title'] = NULL;
But I'm not sure how to work with individual profile2 fields.
Note: based on http://drupal.org/node/1300460 (unanswered)