且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Drupal 5:自定义内容类型中的 CCK 字段

更新时间:2023-02-12 08:33:04

我相信这个领域是

$node->field_flag[0]['value']

在 Drupal 6 中就是这样,它不遵循字段的实际名称或表字段名称.查看字段的简单方法是填写一个节点,然后将其转储以查看其结构.这将为您提供它在 node_save 中期望的名称.我有一段时间没有使用 Drupal 5,但你不会太远.你就在附近.

It's that way in Drupal 6, it doesn't follow the actual name of the field or table field name. The easy way to see what the field is is to fill out a node, then dump it out to see its structure. That will give you the name it is expecting in node_save. I have not used Drupal 5 in a while, but you can't be too far off. You are close.