Tag: 撇号

在撇号CMS中创build自定义图像小部件

我在撇号CMS中创build自定义图像小部件时遇到问题。 目前的apostrophe-images-widgets工作正常,更多的图像,但我需要一个特殊的情况下的网站标志,因为它需要特定的CSS和网站上的具体位置。 我试着按照这里的教程做一个自定义小部件与经理,但我没有得到我想要的结果。 这是我的logo-image模块 module.exports = { extend: 'apostrophe-pieces', name: 'logo-image', label: 'Website Logo', addFields: [ { name: 'companyName', label: 'Company Name', type: 'string', required: true }, { name: 'logo', label: 'Logo', type: 'singleton', widgetType: 'apostrophe-images', options: { limit: 1, minSize: [ 200, 200 ] } } ], construct: function(self, options) { self.beforeSave = function(req, […]

无法将图像保存到插件中

我没有太多关于撇号的知识,但我试图创build一个自定义小部件。 我想在我的小部件中有三个字段: 标题(string) 描述(string) 一个图像 我还没有find一种方法来添加一个图像的小部件作为领域。 现在,我在窗口小部件中添加了一个单例,它工作正常。 但是当添加一个图像时,它会显示在页面上,但是当我重新加载页面时,图像不见了。 我的widget.html代码 <div class="md-jumbotron"> <div class="md-grid"> <h1>{{ data.widget.heading }}</h1> <h6>{{ data.widget.desc }}</h6> <div class="img"> {{ apos.singleton(data.page, 'jumbotroPic', 'apostrophe-images', { limit: 1, size: 'full' }) }} </div> </div> 我在控制台上得到了以下内容 $ node app.js WARNING: No session secret provided, please set the `secret` property of the `session` property of the apostrophe-express […]