如何按照Drupal中的内容类型列出CCK字段 [英] How to list CCK fields by content type in Drupal

查看:87
本文介绍了如何按照Drupal中的内容类型列出CCK字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要获取内容类型的cck字段的列表,我希望使用:

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?

推荐答案

看看 content_fields 函数,如果没有您需要的信息,则 _ content_type_info

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

此外,一旦你有了字段信息,你可以使用 content_database_info 提取表存储和列名。

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

这篇关于如何按照Drupal中的内容类型列出CCK字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆