Custom Page
Custom page modulu saytdakı dinamik səhifə tiplərini (məs. xidmətlər, komanda, layihələr) idarə edir. Hər tipin öz atribut dəsti olur və bir səhifəyə (page) bağlıdır. Bütün endpointlər GET-dir.
| endpoint | təsvir |
|---|---|
GET /api/v1/custompage/pages |
siyahı (səhifələnir). Sonunda / yoxdur |
GET /api/v1/custompage/pages/{slug}/ |
detal |
List
Query parametrləri:
| key | məlumat |
|---|---|
type |
Custom page tipinin id-si |
page, page_size |
bax: Sorğular |
Nəticələr admin tərəfindən təyin olunmuş sıra (sort_order) ilə qayıdır.
{
"next": null,
"previous": null,
"count": 1,
"current": 1,
"page_size": 10,
"results": [
{
"id": 3,
"title": "Veb dizayn",
"slug": "veb-dizayn",
"detail_url": "/xidmetler/veb-dizayn",
"attributes": {
"icon": {
"value": {},
"file_value": "https://solcms.saytqur.az/media/custom_page_attr_values/icon.png",
"type": "image"
},
"summary": { "value": { "text": "..." }, "file_value": null, "type": "text" }
},
"type": { "id": 1, "name": "Xidmətlər", "attributes": ["icon", "summary"] }
}
]
}
| key | məlumat | çoxdil |
|---|---|---|
id |
identifikator | - |
title |
başlıq | Var |
slug |
detal endpointində istifadə olunan slug | Var |
detail_url |
saytdakı yol (/{page_slug}/{slug}) |
- |
attributes |
atributlar. Açar atributun key-idir, dəyər MultiType strukturundadır (value, file_value, type) |
Var |
type |
tip: id, name, attributes (atribut key-lərinin siyahısı) |
- |
Detail
GET /api/v1/custompage/pages/{slug}/
{slug} istənilən dildəki slug ola bilər. Tapılmasa 404. Cavab list elementi ilə eyni strukturdadır.
Custom page detalı çox vaxt page-query vasitəsilə, widget ilə birlikdə istifadə olunur (app: custom_page).