【问题标题】:Cockpit CMS reordering Repeater fieldCockpit CMS 重新排序中继器字段
【发布时间】:2018-08-23 00:18:54
【问题描述】:

我在 Cockpit CMS 的收藏中有一个 repeater 的 set 字段。

选项是:

{
  "fields": [
    {
      "type": "set",
      "label": "Some Block",
      "options": {
        "fields": [
          {
            "name": "title",
            "type": "text"
          },
          {
            "name": "picture",
            "type": "image"
          }
        ]
      }
    }
  ]
}

如何使用repeater 中的display 选项在重新排序模式下显示title 字段?如果可能的话。

驾驶舱文档信息不足,says:

"display": null // display value on re-order

以及除了null之外的其他情况如何使用这个选项?

【问题讨论】:

    标签: php content-management-system cockpit-cms


    【解决方案1】:

    好的。我找到了解决方案。

    选项display 可以是options 的一部分set 字段:

    {
      "fields": [
        {
          "type": "set",
          "label": "Some Block",
          "options": {
            "display": "title", // it must be placed here
            "fields": [
              {
                "name": "title",
                "type": "text"
              },
              {...}
            ]
          }
        }
      ]
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-07-26
      • 1970-01-01
      • 2022-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多