I have a custom node (article) template file working fine, and I want to show related nodes (events) in their teaser format. I have been doing this in my node--article.tpl.php file like this:
foreach ($field_related_event as $event_node){
print render(node_view(node_load($event_node['nid']), 'teaser'));
}
I wanted to add a second teaser format for events (teaser_fancy
) and downloaded "Entity view modes" thinking I would be able to do something like this:
foreach ($field_related_event as $event_node){
print render(node_view(node_load($event_node['nid']), 'teaser_fancy'));
}
But now I read that node_view can only use teaser and full, and it's probably not a good idea to render relationships in my template this way. What's the recommended way to go about this? Should I create an Events Fancy view and use views_embed_view instead?