Files
VITEC-website/packages/vitec/Configuration/TypoScript/Headless/vitec_menus.typoscript
T
orascheandClaude Fable 5.1 8031247acf Page JSON without mainNavigation, i18n and favicons (0110-FE)
The frontend reads the main navigation from the headless initial-data type (?type=834, field navigation) in both SSR and SPA mode, has no language switch and keeps its favicons static, so the three page-level fields were dead weight (about 15 kB per page for mainNavigation alone). Removed from page.10.fields; lib.mainNavigation dropped, FaviconsJsonRenderer stays in the code base unused. Verified on DEV: page JSON of /, /product/aligo and /products/appliances without the three keys, footerMenu/metaMenu unchanged, /_json/?type=834 still delivers the 7 top-level items.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-12 12:54:12 +01:00

70 lines
2.9 KiB
Plaintext
Executable File

# =============================================================================
# VITEC menus — Headless / JSON output
#
# Two menus are exposed at the page root of the JSON response:
# - footerMenu : curated, configured via site setting menu.footer.pageUids
# - metaMenu : curated, configured via site setting menu.meta.pageUids
#
# The main navigation is NOT part of the page JSON any more (0110-FE, 12.11.2026):
# the frontend reads it from the headless initial-data type (?type=834, field
# `navigation`) in both SSR and SPA mode. Same for `i18n` (no language switch)
# and `favicons` (static in the frontend's root.tsx) — removed at the end.
#
# Each menu uses friendsoftypo3/headless MenuProcessor which:
# * resolves Shortcut pages to their target
# * skips pages with "Show in menu = no" (nav_hide=1) by default
# * marks active / current items
# * exposes `children` for sub-levels
# =============================================================================
# -----------------------------------------------------------------------------
# Footer menu — curated by site setting (UIDs)
# -----------------------------------------------------------------------------
lib.footerMenu = JSON
lib.footerMenu {
dataProcessing {
10 = FriendsOfTYPO3\Headless\DataProcessing\MenuProcessor
10 {
special = list
special.value = {$menu.footer.pageUids}
levels = 1
includeSpacer = 0
titleField = nav_title // title
as = footerMenu
}
}
}
# -----------------------------------------------------------------------------
# Meta menu — curated by site setting (UIDs)
# -----------------------------------------------------------------------------
lib.metaMenu = JSON
lib.metaMenu {
dataProcessing {
10 = FriendsOfTYPO3\Headless\DataProcessing\MenuProcessor
10 {
special = list
special.value = {$menu.meta.pageUids}
levels = 1
includeSpacer = 0
titleField = nav_title // title
as = metaMenu
}
}
}
# -----------------------------------------------------------------------------
# Wire them into the page-level JSON output
# -----------------------------------------------------------------------------
page.10.fields.footerMenu =< lib.footerMenu
page.10.fields.metaMenu =< lib.metaMenu
# -----------------------------------------------------------------------------
# Not delivered any more (0110-FE): nobody reads these in the frontend.
# mainNavigation — was the full hierarchy (~15 kB per page), see ?type=834
# i18n — headless default (lib.i18n); there is no language switch
# favicons — FaviconsJsonRenderer stays in the code base, unused
# -----------------------------------------------------------------------------
page.10.fields.i18n >
page.10.fields.favicons >