docs: add nav fix to POC content mapping proposal
Some checks failed
Some checks failed
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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 |
|
| `cms/storefront/landing-full.html` | Ensure gallery section renders |
|
||||||
| Template JSON files | Add `{{hero_subtitle}}`, `{{hero_image}}` placeholders |
|
| 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 %}
|
||||||
|
<a href="{{ base_url }}{{ page.slug }}">{{ page.title }}</a>
|
||||||
|
{% 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
|
## 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)
|
- Phase 2 (AI): depends on provider integration (deferred)
|
||||||
|
|||||||
Reference in New Issue
Block a user