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.

  • Where do you want to use this value? In node.tpl.php? – Елин Й. Oct 22 '13 at 19:35
1

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

  • 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. – user1015214 Oct 22 '13 at 18:03
  • That did it, thanks! I used that function in a custom block. – user1015214 Oct 22 '13 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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