I have been struggling to find the variable that gives a node type in drupal 4.7.

I know that node_get_name($type) gives the name of node type, but how do you get the $type (node type) from the first place? My module has 3 newly defined node types (created in hook_node_info)and I have to differentiate which is chosen by a user. Either $node->type or $node->info didn't give a node type.

Any idea? Many thanks for help in advance.

Comments

khoogheem’s picture

post what you have for node_info.

have you checked the database table node to make sure that node->type is being set correctly?