3

I'm using the following code, and it simply does not work:

 <?php hide($content['body']);
 print render($page['content']); ?>

I would like to hide the body field to show it elsewehere.

1 Answer 1

4

You're rendering the wrong thing: you need to render $content:

hide($content['body']);
print render($content);

See core's implementation of node.tpl.php for more information.

0

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.