Skip to main content
Petanque Life

Navigation & Structure

F18.05 6 features Planned

At a glance

Navigation and structural primitives that hold a CMS site together — a tree-based menu builder with localized labels, auto-generated pages for rankings, calendar, results and club directory, JSON-LD breadcrumbs, gating-aware full-text site search, an XML sitemap for crawlers with hreflang alternates, and a fully customizable footer with link columns, contact info and social handles separated from layout presets.

How it works

Each CmsSite owns a Navigation document containing one or more menus (typically primary, footer and utility). The menu builder is a tree editor: editors add items, set labels per locale, link to internal CmsPages, external URLs or auto-generated pages, and reorder via drag. Auto-generated pages are virtual routes that don't require a CmsPage record — `/rankings`, `/calendar`, `/results`, `/clubs` are rendered by templates that pull data straight from the API and respect the site's tenant scope.

Editors enable or disable each one with a checkbox in site settings; when enabled, the route becomes available to the menu builder and the renderer. Breadcrumbs are derived from the URL hierarchy and CmsPage parent_id, rendered with JSON-LD BreadcrumbList for SEO. Site search indexes every published page, article and dynamic-page snapshot via Algolia (or a self-hosted Meilisearch fallback) and respects page access control — a public visitor never sees results from members-only pages, and a logged-in member sees only pages their groups grant access to.

The search index is refreshed incrementally on every publish event. The XML sitemap is generated on demand at `/sitemap.xml`, includes lastmod, changefreq and priority per page plus xhtml:link hreflang alternates for translated pages, and skips drafts and noindex pages. The footer is a structured editor: editors add columns of links, contact info, social media handles and legal links; a separate set of footer presets (multi-column, minimal, social-focused) controls layout, while content stays editable.

Key capabilities

  • Tree-based menu builder with localized labels and tenant-scoped link picker
  • Auto-generated pages for rankings, calendar, results and club directory
  • Breadcrumb navigation with JSON-LD BreadcrumbList markup
  • Site-scoped full-text search respecting page access control
  • Auto-generated sitemap.xml with hreflang alternates
  • Structured footer editor with link columns, contact info and social links
  • Footer layout presets independent of content

In practice

Léa, secretary of CC Marseille, restructures her club site for the new season. She opens the menu builder, drags 'Calendrier' to second position, adds a new 'École de pétanque' submenu with three child links to membership pages, and translates each label to French and English. She enables the auto-generated /clubs page so visitors can find affiliated venues, then ticks /results so the public can browse last weekend's competitions without leaving the site.

She updates the footer with the new postal address, adds Instagram and Facebook handles, and removes a dead sponsor link. The new sitemap.xml is regenerated on her next publish, and search engines pick up the structural changes within 24 hours.

Features in this subsystem

6
ID Status Features
F18.05.01 Shipped Menu builder (custom navigation) ✅ 449770bd.m-3 — PUT …/navigation + POST/DELETE …/navigation/items med SERVERGENERERADE, stabila item_id, max tre nivåer (422 menu_too_deep), sajtlokala page-mål (422 unknown_menu_target, samma svar för påhittat och främmande id), https-krav på externa mål, broken-dekoration vid läsning i admin och fail-closed-filter i den publika projektionen
F18.05.02 Shipped Auto-generated pages (rankings, calendar, results — pulled from API) ✅ 449770bd.m-6 — POST /v1/cms/sites/{id}:auto-pages skapar utkast med auto_page_type + sitt enda data-block; svaret {created, existing, skipped} och DDL:ens unique (site_id, auto_page_type) gör anropet konvergent. Sidan har ingen egen livscykel — den publiceras genom det vanliga workflowet. En rankings-sida utan publik D-RANK-preset skapas inte utan bokförs skipped: no_public_preset · ⊘ /pages/{id}/refresh byggs inte (blocket läser live, det finns inget kopierat att uppdatera)
F18.05.03 Shipped Breadcrumb navigation ✅ 449770bd.m-2 — parent_page_id-kedjan med cykeldetektering, publik + autentiserad rutt (m-3 lägger bara flaggan show_breadcrumbs i menydokumentet)
F18.05.04 Planned Search within site ⊘ m-5 (publik rendering + sajt-sök)
F18.05.05 Shipped Sitemap generation (XML for search engines) ✅ 449770bd.m-11 — GET /v1/public/cms/sites/{id}/sitemap.xml svarar alltid ett <sitemapindex> (D-12) mot …/sitemap-{n}.xml (5 000 poster/sida). Sitemapen är VÄRDENS (D-13): rot-sajten listar även varje monterad barnsajts sidor i värdens URL-form; barnens egna /{mount}/sitemap.xml finns inte (404). Posten bär <lastmod>/<changefreq>/<priority> + xhtml:link hreflang ur m-10:s alternates-mängd. En opublicerad sida, en no_index-sida och en sajt utan publik värd står ALDRIG där; sitemap_enabled=false ⇒ 404 byte-identiskt med en okänd sajt
F18.05.06 Shipped Footer customization (links, contact info, social media) ✅ 449770bd.m-3 — PUT …/footer-layout (sex presets, länkgrupper, kontaktinfo, sociala länkar ur allowlist) + den publika GET /v1/public/cms/sites/{id}/footer med arvet applicerat · ⊘ nyhetsbrevs-anmälan och övriga formulär i sidfoten är m-9