Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list CCK fields by content type in Drupal

To get a list of a content type's cck fields, I was hoping to use:

drupal_get_schema('content_type_mycontenttype');

but that leaves out fields with multiple values. Is there a simple call to use to get such a list?

like image 982
lazysoundsystem Avatar asked Jun 07 '10 18:06

lazysoundsystem


1 Answers

Take a look at the content_fields function, and if doesn't that have the information you need, there is _content_type_info.

Additionally, once you have the field information, you can extract the table storage and column names using content_database_info.

like image 175
jhedstrom Avatar answered Sep 28 '22 01:09

jhedstrom