Multiple Values in Custom Template Field I have a custom template for a node, and a field which has the possibility of having multiple pieces of data. In this case:


There is an Author node
There are Publication nodes
Publications are being Entity Referenced on the Author node


The custom template then prints the publications to the node

&lt;?php print render($content['field_publications']); ?&gt;


I know that adding ['1'] displays the first publication if multiple publications are attached to the same author, however, how would I display the top 5 publications, if say, there was 10 publications by the same author?
Slice the array?

foreach(array_slice($content['field_publications'], 0, 5) as $field_publication):