I see that with drupal 7 theming, we can mark elements of the $content array as hidden.

From http://drupal.org/update/themes/6/7 :

    // We hide the comments and links now so that we can render them later.
    print render($content);

What other keys always exist? Or if they are dynamically generated, what is the best way to check the hideable content elements?


With the devel module enabled, I found that the information I was looking for roughly corresponds to the information found at the location /node/your_nid/devel/render. Or using PHP directly, dprint_r(array_keys($content));

  • Instead you can do <?php print render($content['important_stuff']); ?> isn't it ?
    – Sivaji
    Mar 29, 2011 at 18:23
  • @Sivaji Yes you could just render specific elements, it is the equivalent functionality as hiding some. My question was what 'important_stuff' keys exist and how to find them.
    – brian_d
    Mar 29, 2011 at 18:33
  • Modules mentioned in the answers below will help in this regard. Perhaps you can simply use print_r() to get the list of available keys and print only the required stuffs.
    – Sivaji
    Apr 1, 2011 at 11:49

2 Answers 2


Yes, it is dynamical, all modules can add new elements.

Install http://drupal.org/project/devel and then use dpm($content); Note that when you do this inside a page, you will probably only see it after another reload.


Install Devel Themer too...

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.