具有多个子字段的 Drupal 自定义 CCK 字段 [英] Drupal Custom CCK field with multiple child fields

查看:26
本文介绍了具有多个子字段的 Drupal 自定义 CCK 字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法创建一个可以有多个值的复合字段,每个值都有另一组复合值?

Is there a way of creating a composite field that can have multiple values, with each value having another group of composite values?

例如我们希望在最后有这个结构:

E.g. we want to have this structure at the end:

  • 第 1 组(组数不限)
    • 子字段(每个组的子项不限)
    • 子字段
    • ...
    • 子字段
    • 子字段
    • ...

    对于定义 CCK 字段的自定义模块,这完全可能吗?如果是这样,有人可以将我推向正确的方向吗?

    Is this possible at all for a custom module that defines a CCK field? If so, can someone push me in the right direction?

    推荐答案

    这是 drupal 世界中一个非常知名且备受争议的问题.

    this is a very know and debated issue in the drupal world.

    这个特性被称为 cck "multigroup",它看起来很难实现.drupal 论坛中有很多关于此的帖子,我建议您从这里开始:

    this feature is called cck "multigroup" and it looks it's pretty difficult to implement. there are a lot of posts in the drupal forum about this, i suggest you to start here:

    http://drupal.org/node/494100

    这是 cck 模块中的一种隐藏"功能.查看模块目录,您会在此处找到说明:

    it's a kind of "hidden" feature in the cck module. looking in the module directory, you will find instructions here:

    cck/modules/content_multigroup/README.txt
    正在进行的多组模块工作已转移到实验阶段CCK 3.0 分支.

    cck/modules/content_multigroup/README.txt
    Ongoing work on the multigroup module has moved to the experimental CCK 3.0 branch.

    与此同时,您可以尝试使用 flexifield 模块来处理它(但它有点hackish,我不会在生产中使用它)

    in the meantime you can try to deal with it using the flexifield module (but it's kinda hackish, i won't use it in production)

    这篇关于具有多个子字段的 Drupal 自定义 CCK 字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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