Sudan Hari
Sudan Hari

Reputation: 51

display node type

I have some custom pages in my drupal 7 site. I need to display the name of the content type in each page. What function shall I use to display the name of the content type?

Upvotes: 0

Views: 591

Answers (1)

mmiles
mmiles

Reputation: 961

You could print out the content type from the node.tpl.php in your theme. The $node object gets passed to the node.tpl.php file , you you just need to echo out <?php echo $node->type; ?> where you want it to display.

Upvotes: 1

Related Questions