So I'm trying to create a View, displayed in a Block, that will show a list of nodes that reference the same parent node as the node I'm currently in. The reference is a custom field using the References module. I'm on Drupal 7 with Views 3.
I figure I'll setup a Contextual Filter on my custom field (field_ref_photo_gallery) and I need to provide a default value via PHP code.
How should I write that PHP code in the most Drupal 7-ish way?
Should I go with something like:
(I'm not even sure that would work. I just threw that together in this post)
Or is there a field API function I should be calling?