Pergunta


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 :

  <?php
    // We hide the comments and links now so that we can render them later.
    hide($content['comments']);
    hide($content['links']);
    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?

Thanks

Edit
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));

Foi útil?

Solução

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.

Outras dicas

Install Devel Themer too...

Licenciado em: CC-BY-SA com atribuição
Não afiliado a drupal.stackexchange
scroll top