【问题标题】:Is there a way to input the data of multiple content types all on the same page in Drupal 8?有没有办法在 Drupal 8 的同一页面上输入多种内容类型的数据?
【发布时间】:2018-09-19 05:20:03
【问题描述】:

我有三种内容类型:studentcoursestudent_takes_coursestudent_takes_course 有两个引用字段指向 studentcourse 内容类型)。

要输入新的student_takes_course 记录,我首先必须转到student 内容类型并输入新的student 记录,然后转到course 内容类型并输入新的@987654331 @记录,然后我才能转到student_takes_course内容类型并输入一条新记录,该记录引用了新输入的studentcourse记录)。

但是有没有办法在同一页面上输入studentcoursestudent_takes_course 记录?

【问题讨论】:

    标签: drupal drupal-8


    【解决方案1】:

    Inline entity form 允许您在创建/编辑父级时创建新实体或引用现有实体。

    这是一个非常强大的模块,但如果你在父子节点上都使用它会变得混乱,例如student_takes_course 有一个 IEF 引用 studentstudent 和一个对应的 IEF 引用 student_takes_course

    在这种情况下,您可以从student_takes_course (1) 创建一个新的student (2),然后从student (2) 创建一个新的student_takes_course (3),然后从student_takes_course (3 创建一个新的sstudent (4),依此类推。

    • student_takes_course
      • 学生
        • student_takes_course
          • 学生

    解决此问题的方法是使用表单模式来限制每个 IEF 中显示的字段。或者没有对应的参考字段……

    【讨论】:

      猜你喜欢
      • 2014-08-08
      • 1970-01-01
      • 2019-11-02
      • 1970-01-01
      • 2021-04-27
      • 1970-01-01
      • 2021-06-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多