refactor(platform): make base template fully CMS-driven and platform-aware
Some checks failed
CI / ruff (push) Successful in 10s
CI / pytest (push) Has been cancelled
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled

Remove all hardcoded OMS-specific content from platform base template:
nav links, contact info, brand name, and footer columns. Everything is
now dynamic via platform model and CMS page queries. Wire up legal_pages
context (privacy/terms) from database instead of hardcoded fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 17:41:24 +01:00
parent 28dca65a06
commit b5b73559b5
4 changed files with 32 additions and 61 deletions

View File

@@ -282,6 +282,7 @@ class ContentPageService:
include_unpublished: bool = False,
footer_only: bool = False,
header_only: bool = False,
legal_only: bool = False,
) -> list[ContentPage]:
"""
List platform marketing pages.
@@ -292,6 +293,7 @@ class ContentPageService:
include_unpublished: Include draft pages
footer_only: Only pages marked for footer display
header_only: Only pages marked for header display
legal_only: Only legal pages (privacy, terms) — not in header or footer nav
Returns:
List of platform marketing ContentPage objects
@@ -311,6 +313,9 @@ class ContentPageService:
if header_only:
filters.append(ContentPage.show_in_header == True)
if legal_only:
filters.append(ContentPage.slug.in_(["privacy", "terms"]))
return (
db.query(ContentPage)
.filter(and_(*filters))