20

in Drupal 7, which function do I need to call to get the name of the content type? I have the $node object and I also have the id of the content type if I use $node->type. But I need to get the name of the content type set in the system, not the ID as something like 'name_of_the_content_type'. I need it as 'Name of the content type'.

Thank you.

1 Answer 1

19

Try calling this function

node_type_get_name($node)

Returns the node type name of the passed node or node type string.

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.