/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//USING THE FIELD API $excerpt = field_get_items('node', $node, 'field_excerpt'); $excerpt = field_view_value('node', $node, 'field_excerpt', $excerpt[0]); $thumbnail = field_get_items('node', $node, 'field_page_thumbnail'); //var_dump($thumbnail); $thumbnail = field_view_value('node', $node, 'field_page_thumbnail', $thumbnail[0]); //Or using the ENTITY API //Method 1: //example of loading a field collection $node_wrapper = entity_metadata_wrapper('node', $node); // the name of the field $featured_collection = $node_wrapper->field_featured_collection;