feat(cms): CMS-driven homepages, products section, placeholder resolution
Some checks failed
Some checks failed
- Add ProductCard/ProductsSection schema and _products.html section macro
- Rewrite seed script with 3-platform homepage sections (wizard, OMS, loyalty),
platform marketing pages, and store defaults with {{store_name}} placeholders
- Add resolve_placeholders() to ContentPageService for store default pages
- Fix SQLAlchemy filter bugs: replace Python `is None` with `.is_(None)` across
all ContentPageService query methods (was silently breaking all platform page lookups)
- Remove hardcoded orion fallback and delete homepage-orion.html
- Add placeholder hint box with click-to-copy in admin content page editor
- Export ProductCard/ProductsSection from cms schemas __init__
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -101,9 +101,17 @@ async def generic_content_page(
|
||||
},
|
||||
)
|
||||
|
||||
# Resolve placeholders in store default pages ({{store_name}}, etc.)
|
||||
page_content = page.content
|
||||
if page.is_store_default and store:
|
||||
page_content = content_page_service.resolve_placeholders(page.content, store)
|
||||
|
||||
context = get_storefront_context(request, db=db, page=page)
|
||||
context["page_content"] = page_content
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"cms/storefront/content-page.html",
|
||||
get_storefront_context(request, db=db, page=page),
|
||||
context,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user