From 27ac7f3e28be3203396e42d1ecf48091ddef49e8 Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Fri, 3 Apr 2026 21:32:15 +0200 Subject: [PATCH] docs: add nav fix to POC content mapping proposal E-commerce nav (Products, Cart, Account) shows on hosting POC sites. Preview mode should render only CMS pages (Services, Projects, Contact) in the nav, not module-defined e-commerce items. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/proposals/poc-content-mapping.md | 33 ++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/proposals/poc-content-mapping.md b/docs/proposals/poc-content-mapping.md index 633028a4..1fc74816 100644 --- a/docs/proposals/poc-content-mapping.md +++ b/docs/proposals/poc-content-mapping.md @@ -137,7 +137,38 @@ When `request.state.is_preview` is True, render social links from the store's CM | `cms/storefront/landing-full.html` | Ensure gallery section renders | | Template JSON files | Add `{{hero_subtitle}}`, `{{hero_image}}` placeholders | +## Additional Issue: Storefront Navigation + +The storefront base template shows e-commerce navigation (Products, Cart, Account) which makes no sense for a hosting POC (construction company showing "Products" in the menu). + +**Fix options:** +1. **Platform-aware nav** — the hosting platform should have its own storefront base template (or at minimum, a nav override) that hides e-commerce menus and only shows CMS pages +2. **CMS-only nav for POC** — when `is_preview` is True, render navigation only from the store's published CMS pages (`show_in_header=True`), not from module-defined nav items +3. **Storefront nav config per platform** — each platform defines which nav items are visible (hosting = CMS pages only, OMS = full e-commerce, loyalty = loyalty-specific) + +**Recommended: Option 2** — simplest, preview-specific. In `storefront/base.html`, when `request.state.is_preview`, replace the entire nav with links to CMS pages: + +```html +{% if request.state.is_preview|default(false) %} + {# Preview mode: show only CMS pages, no e-commerce nav #} + {% for page in header_pages %} + {{ page.title }} + {% endfor %} +{% else %} + {# Normal storefront nav #} + ... existing e-commerce nav ... +{% endif %} +``` + +The `header_pages` variable is already populated from CMS ContentPages where `show_in_header=True`. + +## Files to modify (navigation fix) + +| File | Change | +|---|---| +| `app/templates/storefront/base.html` | Wrap main nav in `is_preview` check, show CMS-only nav in preview mode | + ## Estimated effort -- Phase 1 (programmatic): ~2-3 hours +- Phase 1 (programmatic content mapping + nav fix): ~3-4 hours - Phase 2 (AI): depends on provider integration (deferred)