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>
This commit is contained in:
1 parent
e14f94ba63
commit
8031247acf
1 file changed
+12
-24
@@ -1,11 +1,15 @@
|
|||||||
# =============================================================================
|
# =============================================================================
|
||||||
# VITEC menus — Headless / JSON output
|
# VITEC menus — Headless / JSON output
|
||||||
#
|
#
|
||||||
# Three menus are exposed at the page root of the JSON response:
|
# Two menus are exposed at the page root of the JSON response:
|
||||||
# - mainNavigation : full hierarchy from root, all visible pages
|
|
||||||
# - footerMenu : curated, configured via site setting menu.footer.pageUids
|
# - footerMenu : curated, configured via site setting menu.footer.pageUids
|
||||||
# - metaMenu : curated, configured via site setting menu.meta.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:
|
# Each menu uses friendsoftypo3/headless MenuProcessor which:
|
||||||
# * resolves Shortcut pages to their target
|
# * resolves Shortcut pages to their target
|
||||||
# * skips pages with "Show in menu = no" (nav_hide=1) by default
|
# * skips pages with "Show in menu = no" (nav_hide=1) by default
|
||||||
@@ -13,23 +17,6 @@
|
|||||||
# * exposes `children` for sub-levels
|
# * exposes `children` for sub-levels
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Main navigation — full hierarchy
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
lib.mainNavigation = JSON
|
|
||||||
lib.mainNavigation {
|
|
||||||
dataProcessing {
|
|
||||||
10 = FriendsOfTYPO3\Headless\DataProcessing\MenuProcessor
|
|
||||||
10 {
|
|
||||||
levels = 10
|
|
||||||
expandAll = 1
|
|
||||||
includeSpacer = 0
|
|
||||||
titleField = nav_title // title
|
|
||||||
as = mainNavigation
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Footer menu — curated by site setting (UIDs)
|
# Footer menu — curated by site setting (UIDs)
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
@@ -69,13 +56,14 @@ lib.metaMenu {
|
|||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Wire them into the page-level JSON output
|
# Wire them into the page-level JSON output
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
page.10.fields.mainNavigation =< lib.mainNavigation
|
|
||||||
page.10.fields.footerMenu =< lib.footerMenu
|
page.10.fields.footerMenu =< lib.footerMenu
|
||||||
page.10.fields.metaMenu =< lib.metaMenu
|
page.10.fields.metaMenu =< lib.metaMenu
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Favicon / app-icon set (site-wide) — see FaviconsJsonRenderer
|
# Not delivered any more (0110-FE): nobody reads these in the frontend.
|
||||||
# Icon files: public/fileadmin/icons/
|
# 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.favicons = USER
|
page.10.fields.i18n >
|
||||||
page.10.fields.favicons.userFunc = Evomedien\Vitec\UserFunc\FaviconsJsonRenderer->render
|
page.10.fields.favicons >
|
||||||
Reference in new issue
Block a user