开发者

drupal cck api: how to retrieve field-type for a particular cck field

开发者 https://www.devze.com 2023-02-22 07:51 出处:网络
Suppose I have a field nam开发者_如何学Ced \'field_myimage\'. Does cck have an api function that will allow me to retrieve the field-type (eg \'filefield\') and widget (eg \'image upload\') associated

Suppose I have a field nam开发者_如何学Ced 'field_myimage'. Does cck have an api function that will allow me to retrieve the field-type (eg 'filefield') and widget (eg 'image upload') associated with this fieldname?

Thanks for your help.


foreach(content_fields() AS $field => $info){
  drupal_set_message("$field : ". $info['module']);
}

or you can retrieve info by other way:

$field = content_database_info(content_fields('field_myfield'));
0

精彩评论

暂无评论...
验证码 换一张
取 消