Vulcan/packages/custom/lib/custom_fields.js

45 lines
734 B
JavaScript
Raw Normal View History

2015-04-24 09:28:50 +09:00
// Custom Post Field
2014-12-11 12:07:41 +09:00
2015-05-11 12:39:32 +09:00
Posts.registerField({
fieldName: 'customPostField',
fieldSchema: {
2015-05-11 12:39:32 +09:00
type: String,
optional: true,
editableBy: ["member", "admin"]
}
});
// Custom Comment Field
Comments.registerField({
fieldName: 'customCommentField',
fieldSchema: {
type: String,
optional: true,
editableBy: ["member", "admin"]
}
});
// Custom User Field
Users.registerField({
fieldName: 'customUserField',
fieldSchema: {
type: String,
optional: true,
editableBy: ["member", "admin"]
}
});
// Custom Setting Field
Settings.registerField({
fieldName: "customSettingsField",
fieldSchema: {
type: String,
optional: true,
autoform: {
2015-05-11 12:39:32 +09:00
group: "customGroup"
}
}
2015-05-11 12:39:32 +09:00
});