Page body
What this form does
This pack covers the legacy CMS page create and edit routes under /content.
- create route:
/content/create - edit route:
/content/edit/[cmsPageId]
Both routes use the same PageEditor shell, but create and edit have different bootstrap and submit behavior.
What operators manage here
Slugfor the route fragment.Categoryfrom the static legacy category list:SupportAboutResponsible Gaming
Statusas the active/inactive visibility switch.- Active language tabs loaded from
GET /api/admin/get-languages?active=true. - Localized
Contenton the selected language tab. - Localized
Titlewhere the current FE actually renders the title input for the selected language.
Create vs edit
Create
- Starts with blank values, active status enabled, and
ENas the initial tab. Createposts directly toPOST /api/admin/create-cms.- Successful create shows a success toast and resets the form in place.
- The operator stays on the create route after submit.
Edit
- Loads one existing page through
GET /api/admin/get-cms-details?cmsPageId=<id>. Savewrites throughPUT /api/admin/update-cms.- Successful save shows a success toast and keeps the operator on the same edit route.
Common confusion
This form does not have a separate publish step. Saving the form writes directly to the admin-owned CMS page record. The only visibility control in this flow is isActive.
Important caveats
Cancelis a fixed link to/content, notrouter.back().- The legacy category selector is FE-owned and uses a static option map rather than backend-loaded category metadata.
- The current
PageEditoronly renders the visibleTitleinput whentitle[currentTab]is already truthy in the FE state. Empty or missing locale keys therefore do not expose a standalone title box on that tab.