驾驶舱CMS重新排序中继器领域

时间:2018-03-14 12:51:52

标签: php content-management-system cockpit

我在Cockpit CMS的馆藏中有repeaterset个字段。

选项是:

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

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

驾驶舱文档资料不足,says

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

如何在其他情况下使用此选项,null除外?

1 个答案:

答案 0 :(得分:1)

行。我找到了解决方案。

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

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