0

I have an event node which contains a reference to a gallery field collection. If I do a dump of the $variables variable, I can find this

$variables -> field_gallery_image['und'][0]['value']

but I don't know where to use that value to do a table look up to actually find the data in the field collection. I was able to find that id number in the field_collection_item table, and then was able to find that id in the field_data_field_image table (I have an image field), but I'm not sure where to go from here.

1
  • Where do you want to use this value? In node.tpl.php?
    – Elin Y.
    Commented Oct 22, 2013 at 19:35

1 Answer 1

1

I believe you are looking for field_collection_item_load or field_collection_item_load_multiple function both are in field_collection.module

2
  • can those functions be called from inside of the theme template, or do I need a custom module? I want to be able to use the data for display purposes. Commented Oct 22, 2013 at 18:03
  • That did it, thanks! I used that function in a custom block. Commented Oct 22, 2013 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.