在撇号 CMS 中使用多个嵌套模块

Using multiple nested-modules in apostrophe CMS

我正在使用 apostrophe-cms (2.x) 创建一组模块(小部件)。 现在我想创建不同的嵌套小部件,以使用一些模块,例如在 2 列布局中。 我按照嵌套小部件 https://apostrophecms.org/docs/tutorials/getting-started/layout-widgets.html 的教程创建了一个简单的两列布局:

module.exports = {
  extend: 'apostrophe-widgets',
  label: 'Two Column Layout',
  contextualOnly: true,
  addFields: [{
      name: 'columnLeft',
      type: 'area',
      label: 'Left Area',
    },
    {
      name: 'columnRight',
      type: 'area',
      label: 'Right Area',
    }
  ]
};

部分可行。我可以在这两个区域内添加其他小部件,并且 html 得到正确构建。 当我在两列布局下方使用其他小部件时,问题就来了。查看 Inspector,我看到所有小部件 below 都内置在两列 apos-area-widget-wrapper 中。当我只想删除两列小部件时,我也删除了下面的所有模块。 (见图Link)

Chrome Inspector, wrong nesting of widgets inside the two column widget

我是不是遗漏了什么,或者嵌套布局是否以某种方式遗漏了它的结束标记,所以所有内容都被拉入其中?

(更新):试图缩小问题范围:我可以在下面添加新的(非布局)模块,它们看起来是正确的。一旦我尝试添加另一个布局小部件,我就无法对其进行任何操作,因为它不保存任何信息。

(更新):GitHub 演示项目:https://github.com/raphaelurban/apostrophe-test

我没有完全理解你的行为,但 accordion-widgets 的模板确实没有正确关闭它的标记。泄漏可能会以不同方式影响不同的浏览器,在 Chrome 我得到了一些损坏的堆栈。