【问题标题】:options for areas in apostrophe apos-widgets撇号小部件中区域的选项
【发布时间】:2017-11-04 06:12:18
【问题描述】:

我想创建一种包装小部件 - 一个有两个区域,每个区域都有相同的可用小部件。我配置了like it was described in documentation,但是好像index.js的options对象没有通过。

如果在index.js 我有:

module.exports = {
    extend: 'apostrophe-widgets',
    name: 'block-full-two',
    label: 'Fullscreen block',
    addFields: [{
            name: 'left',
            type: 'area',
            label: 'Left area',
            options: {
                widgets: {
                    'apostrophe-rich-text': {(...)}
                }
            },
            contextual: true
        }
        (...)
    ]
}

widget.html:

{{ apos.area(data.widget, 'left') }}

然后创建区域,但是当我单击加号图标时,可用小部件列表为空。但是当我直接在widget.html:{{ apos.area(data.widget, 'left', { widgets: {...}}) }} 中传递小部件时,它可以工作。 是不是我做错了什么?

【问题讨论】:

    标签: javascript apostrophe-cms


    【解决方案1】:

    我已经在 github 中为此打开了一个问题,因为这是内部出现的 https://github.com/punkave/apostrophe/issues/1096

    现在,您应该直接将这些选项显式传递到模板中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-28
      相关资源
      最近更新 更多