3.0 KiB
Static Pages / CMS - Sprint 14
Scope
Sprint 14 adds configuration-driven CMS support for unlimited marketplace static pages.
Out of scope:
- backend save endpoints
- marketplace-specific content logic
- hardcoded page names
Feature Architecture
src/app/features/content-management/
facade/
services/
models/
pages/
components/
Main pieces:
ContentPageServicenormalizes bootstrap static page dataContentManagementFacadeexposes normalized pages and validation helpersStaticPagesEditorComponentintegrates CMS editing into Project Editor
Bootstrap Structure
Static pages live under bootstrap.staticPages.
Supported properties per page:
idslugtitleshowInFootershowInHeadershowInSitemapiconordervisibilityrequiresAuthenticationfooterGrouptranslationshtmlseo
Translation Model
Content can be stored in translations[locale]:
titlehtmlseo
Legacy structures remain supported through normalization.
Dynamic Routing
Frontend uses dynamic static page resolution instead of manual page registration.
Current route surface:
/:lang/:staticPath- legacy compatibility:
/:lang/page/:key
Resolver maps route slug to bootstrap-configured page.
Header Generation
Pages with showInHeader: true render in header navigation.
No hardcoded page list required.
Footer Generation
Footer can render grouped static pages from bootstrap flags and metadata.
Supported grouping:
- Company n- Customer
- Legal
- Support
- Social
Social links come from footer bootstrap config.
Rendering
StaticPageComponent now:
- resolves content by slug or id
- reloads content when language changes
- updates document title/meta
- supports RTL-ready
dirswitching - renders backend HTML safely through sanitization
Editor Integration
Project Editor now includes Static Pages section.
Supported actions:
- create page
- delete page
- enable footer/header/sitemap visibility
- edit slug
- edit icon
- edit order
- edit translations
- edit HTML
Validation
Current validation prevents:
- duplicate slugs
- empty titles
Future Backend Endpoints
Recommended future endpoints:
GET /builder/content-pagesPUT /builder/content-pagesPOST /builder/content-pages/importGET /builder/content-pages/exportPOST /builder/content-pages/validate
Example Bootstrap
{
"staticPages": {
"about": {
"id": "about",
"slug": "about",
"title": { "en": "About Us", "ru": "О нас" },
"showInFooter": true,
"showInHeader": true,
"showInSitemap": true,
"icon": "info",
"order": 1,
"requiresAuthentication": false,
"footerGroup": "Company",
"translations": {
"en": {
"title": "About Us",
"html": "<h2>About</h2><p>Company story</p>"
}
},
"seo": {
"title": { "en": "About Us" },
"description": { "en": "About our marketplace" },
"canonical": "/about"
}
}
}
}