انتقل إلى المحتوى الرئيسي

collection / collections

المخطط (Schema)

{
"primary": { "type": "collection", "label": "المجموعة", "default": "" },
"list": { "type": "collections", "label": "المجموعات", "default": [] }
}

مثال Nunjucks

<p>{{ widget.data.primary }}</p>
{% for c in widget.data.list %}<span>{{ c.title }}</span>{% endfor %}

استخدمه لربط widgets بمجموعة واحدة أو عدة مجموعات.

مثال المخرجات (كـ JSON)

{
"primary":{
"_id": "691f38a8a60232b8a1049823",
"app": "6786b189a50b21ed13baac70",
"title": "innds",
"slug": "jjhh",
"handle": "jjhh",
"image": {
"_id": "67ffd1927f7cd6da2d12bfdd",
"fileUrl": "https://cdn.qumra.cloud/system/assets/1754930273587-912200541.webp",
"notFound": true
},
"description": "",
"operation": "manual",
"deleted": false,
"createdAt": "2025-11-20T15:50:00.352Z",
"updatedAt": "2025-11-24T12:52:40.365Z",
"__v": 0,
"id": "691f38a8a60232b8a1049823",
"productCount": 4
},
"lists":[
{
"_id": "691dd653fd42e3a428fdadd0",
"app": "6786b189a50b21ed13baac70",
"title": "ttt",
"slug": "tt",
"handle": "tt",
"image": {
"_id": "67ffd1927f7cd6da2d12bfdd",
"fileUrl": "https://cdn.qumra.cloud/system/assets/1754930273587-912200541.webp",
"notFound": true
},
"description": "ttttttttttttttttttttttttttttttt",
"operation": "manual",
"deleted": false,
"createdAt": "2025-11-19T14:38:11.784Z",
"updatedAt": "2025-11-19T14:38:11.784Z",
"__v": 0,
"id": "691dd653fd42e3a428fdadd0",
"productCount": 6
},
{
"_id": "691dd649fd42e3a428fdad4b",
"app": "6786b189a50b21ed13baac70",
"title": "ttttt",
"slug": "tttttttttttttt",
"handle": "tttttttttttttt",
"image": {
"_id": "68f7e59156e183c98483b051",
"file": "1761076625504-514615192.webp",
"app": "6786b189a50b21ed13baac70",
"id": "68f7e59156e183c98483b051",
"fileUrl": "https://cdn.qumra.cloud/media/6786b189a50b21ed13baac70/1761076625504-514615192.webp"
},
"description": "ttttttttttttttttttttttttttttttt",
"operation": "manual",
"deleted": false,
"createdAt": "2025-11-19T14:38:01.463Z",
"updatedAt": "2025-11-19T14:38:01.463Z",
"__v": 0,
"id": "691dd649fd42e3a428fdad4b",
"productCount": 6
}
]
}