Powered by Blogger.

Get node id of parent node of field collection field


Get node id of the parent node of the field collection field

$model = entity_load_single('field_collection_item', $field_entity_id);
$node = $model->hostEntity();
echo $node->nid;

No comments