Sync static image slots from the live website catalog.
Refresh now imports keys from the storefront and deletes unused slots plus their files. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
1c7678ce67
commit
5e5bfc4aa3
@@ -54,6 +54,37 @@ Named slots the business dashboard can replace. Fetch once per page:
|
||||
|
||||
Use `slot.key` in the placeholder. Match `pageKey` to the website page. For a single image: `images[0]?.url`. For a list: map `images` (if `itemCount` is set, that many images are expected). Each image may include `titleFa`, `titleEn`, `subtext`, and `linkUrl`. If `linkUrl` is set, wrap in `<a href={linkUrl}>`. Pick `titleFa` or `titleEn` from the site locale. If `images` is empty, keep the local fallback.
|
||||
|
||||
**Also publish a slot catalog on this website** so the business dashboard Refresh button can import keys from the main domain:
|
||||
|
||||
`GET https://<WEBSITE_DOMAIN>/meshkee/static-image-slots`
|
||||
|
||||
```json
|
||||
{
|
||||
"slots": [
|
||||
{
|
||||
"key": "slider",
|
||||
"label": "Homepage slider",
|
||||
"kind": "list",
|
||||
"pageKey": "home",
|
||||
"aspectRatio": "16:9",
|
||||
"itemCount": null,
|
||||
"recommendedWidth": 1440
|
||||
},
|
||||
{
|
||||
"key": "home-side-banner",
|
||||
"label": "Side banner",
|
||||
"kind": "single",
|
||||
"pageKey": "home",
|
||||
"aspectRatio": "12:19",
|
||||
"itemCount": 1,
|
||||
"recommendedWidth": 480
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
`kind` is `single` (one image) or `list` (duplicatable). For a fixed row, set `itemCount` (e.g. `2`). Leave `itemCount` null for an unbounded slider. `aspectRatio` must look like `16:9`. Do not invent CMS/upload APIs.
|
||||
|
||||
If OpenAPI and this brief conflict, **OpenAPI wins**.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user