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

查看:19
本文介绍了如何在 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天全站免登陆