기본적으로 "게시 된"옵션을 "true"대신 "false"로 설정하고 싶습니다.apostropheCMS의 기본 페이지 무시 옵션
나는 아포스트로피 - 주문 페이지에서이 있었다하려고 :
을하지만 그것은 작동하지 않습니다! 손을 댈 수 있습니까?
감사
편집
: 어쩌면 내 기본 옵션은 다른 곳에서 오버라이드되는 완전한하는 index.js?var _ = require('lodash');
module.exports = {
extend: 'apostrophe-doc-type-manager',
beforeConstruct: function(self, options) {
options.name = options.name || self.__meta.name.replace(/\-pages$/, '-page');
if (options.permissionsFields === undefined) {
// By default, pages have nuanced permissions
options.permissionsFields = true;
}
options.addFields = [
{
type: 'boolean',
name: 'published',
label: 'Published',
def:false
},
{
type: 'slug',
name: 'slug',
label: 'Slug',
required: true,
// with this flag, a leading/is enforced, and slashes
// elsewhere are allowed etc.
page: true
},
{
type: 'select',
name: 'type',
label: 'Type',
required: true,
choices: _.map(options.apos.pages.typeChoices, function(type) {
return {
value: type.name,
label: type.label
};
})
},
{
type: 'boolean',
name: 'orphan',
label: 'Hide in Navigation'
}
].concat(options.addFields || []);
options.arrangeFields = [
{
name: 'basics',
label: 'Basics',
fields: [ 'meta-description', 'title', 'slug', 'type','alaune', 'color', 'published', 'tags', 'orphan' ]
}
].concat(options.arrangeFields || []);
},
construct: function(self, options) {
require('./lib/dispatch.js')(self, options);
require('./lib/api.js')(self, options);
}
};
하하 나는이 사이트를 아주 좋아하지만, 더 많은 의견을 남기지 않고 코드를 게시 할 수는 없습니다. 글쎄, 내 문제는 설명하기가 매우 쉽다.
그래서 .. 아포스트로피 -CMS 팀에게 감사를 표합니다 ^^ 환자 지원에 대해 Tom!
정상 작동합니다. 'beforeConstruct'에 넣었 니? 보다 완전한 코드를 게시하십시오. 감사! –
Hello Tom, 답장을 보내실 분 다른 파일에서이 기본 옵션을 무시할 수 있습니까? – JGrimbert