0

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?

marked as duplicate by tostinni, kiamlaluno, Clive May 19 '12 at 22:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

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.