Rendering fields works a little differently in Drupal 7 – to our advantage!
Let’s say you wanted to print one of the fields on a node somewhere different than normal – away from the rest. In Drupal 6 this tended to be a bit of a rigmarole. Drupal 7 has made this process a lot easier.
In Drupal 7 content is rendered in nodes using the render function:
If we want to render a field separately, or stop a field from being rendered at all, we can use the hide function:
This stops our fields from being rendered in the print render($content); and we can now print it out wherever we like using Drupal render:
It’s as easy as that, our field is now printed wherever we like and all the other fields are still printed out in $content.