驾驶舱 CMS 重新排序中继器字段



我在驾驶舱CMS的收藏中有set字段的repeater

选项为:

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

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

驾驶舱文档信息不足,它说:

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

以及如何在其他情况下使用此选项,除了null

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

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

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

最新更新