Possible Duplicate:
Listing entity fields

I want list fields of my content type(example: blog), so as described at Drupal API reference, I should pass $entity_type and $entities to this function.

I know $entity_type is 'node', but how can I fill $entities? I should fill $entities with bundle of "blog" so I should know the bundle ID. How can I know bundle ID for blog?


1 Answer 1


If you want the list of fields per content type (now bundles in Drupal 7), you should use field_info_instances().

//List all fields of bundle "your_content_type" using devel module
dsm(field_info_instances('node', 'your_content_type'));

Not the answer you're looking for? Browse other questions tagged or ask your own question.