นี่คือคำจำกัดความเหตุการณ์ของฉัน
module.exports = {
extend: 'apostrophe-pieces',
name: 'event',
label: 'Event',
pluralLabel: 'Events',
addFields: [
{
name: 'eventName',
label: 'Event Name',
type: 'string',
required: true
},
{
name: 'location',
label: 'Location',
type: 'string',
required: true
},
{
name: 'date',
label: 'Date',
type: 'date',
required: true
},
{
name: 'thumbnail',
label: 'Thumbnail',
type: 'singleton',
widgetType: 'apostrophe-images',
options: {
limit: 1,
minSize: [ 200, 200 ],
aspectRatio: [ 1, 1 ]
}
}
]
};
ฉันจะใช้ชุดย่อยของเหตุการณ์ในอนาคตที่ใกล้ที่สุด 5 เหตุการณ์บนเพจได้อย่างไร
นอกจากนี้ หากฉันกำลังจะทำอะไรที่คล้ายกันกับลูกค้า ฉันสามารถใช้ชุดย่อยที่แตกต่างกันในหน้าต่างๆ โดยอิงตามฟิลด์สตริงที่ระบุอุตสาหกรรมของพวกเขาได้หรือไม่