1

So I see in the archives how to override a node's $title (How do I overwrite node title for specific content type?), but how would I override the node's content in Drupal 7? I see that Drupal 7 no longer uses $vars['content'], which was really handy in Drupal 6

1 Answer 1

2

In Drupal 7 the content is in $content.

See node.tpl.php

<?php print render($content); ?>

The $content definition:

An array of node items. Use render($content) to print them all, or print a subset such as render($content['field_example']). Use hide($content['field_example']) to temporarily suppress the printing of a given element.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.