From da2ebdca23c43e109f977a51ec3a54913da62670 Mon Sep 17 00:00:00 2001 From: Oliver Rasche Date: Mon, 2 Nov 2026 15:11:26 +0100 Subject: [PATCH] Product detail: resources section layout 3 "Hardware option" - The Resources Section Layout select gained a third value, hardware ("Layout 3 - Hardware option"): Technical Highlights spread over two columns, no resource cards - ProductShowJsonRenderer::resourcesBand() emits the same envelope with items: [] for hardware even when cards are maintained, so the cards stay on the product and reappear when switching back to layout 1 or 2 - Spec v1.27 (resources.sectionLayout values) Co-Authored-By: Claude Opus 5.5 --- .../UserFunc/ProductShowJsonRenderer.php | 26 ++++++++++++++----- .../TCA/tx_vitec_domain_model_product.php | 4 ++- .../Headless-JSON-Architecture.md | 5 ++-- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/packages/vitec/Classes/UserFunc/ProductShowJsonRenderer.php b/packages/vitec/Classes/UserFunc/ProductShowJsonRenderer.php index 9eec805..6c20c58 100755 --- a/packages/vitec/Classes/UserFunc/ProductShowJsonRenderer.php +++ b/packages/vitec/Classes/UserFunc/ProductShowJsonRenderer.php @@ -255,12 +255,7 @@ class ProductShowJsonRenderer 'solutions' => $this->getProductSolutions($uid), // Detail-only like heroimage: resource cards are detail-page // furniture a list never shows. - 'resources' => array_merge( - $this->getProductResources($uid), - // Section layout (customer CR 2026-10-26): how the front end - // arranges the Technical Highlights / Resources band. - ['sectionLayout' => (string)(($product['resources_layout'] ?? '') ?: '50-50')] - ), + 'resources' => $this->resourcesBand($uid, (string)(($product['resources_layout'] ?? '') ?: '50-50')), ]; // schema.org JSON-LD (Product + optional VideoObject) as a ready-to-emit @@ -792,6 +787,25 @@ class ProductShowJsonRenderer * whose link is empty or unresolvable is dropped (decision 2026-09-24). * List envelope: `layout` switches to `carousel` above three cards. */ + /** + * The Technical Highlights / Resources band: resource cards plus the + * section layout (customer CR 2026-10-26) that tells the front end how to + * arrange the band. Layout `hardware` (2026-11-02) spreads the highlights + * over two columns WITHOUT resources - the cards are not emitted at all + * (same envelope, empty items), while the maintained records stay in the + * product for a switch back. + * + * @return array{layout:string,items:array>,sectionLayout:string} + */ + protected function resourcesBand(int $productUid, string $sectionLayout): array + { + $band = $sectionLayout === 'hardware' + ? ['layout' => 'grid', 'items' => []] + : $this->getProductResources($productUid); + $band['sectionLayout'] = $sectionLayout; + return $band; + } + protected function getProductResources(int $productUid): array { $queryBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Database\ConnectionPool::class) diff --git a/packages/vitec/Configuration/TCA/tx_vitec_domain_model_product.php b/packages/vitec/Configuration/TCA/tx_vitec_domain_model_product.php index 74a8c03..37dd45f 100755 --- a/packages/vitec/Configuration/TCA/tx_vitec_domain_model_product.php +++ b/packages/vitec/Configuration/TCA/tx_vitec_domain_model_product.php @@ -471,7 +471,7 @@ return [ 'resources_layout' => [ 'exclude' => true, 'label' => 'Resources Section Layout', - 'description' => 'How the detail page arranges the Technical Highlights / Resources band. Layout 1 (default): Technical Highlights on the left, resource cards on the right (50/50). Layout 2: Technical Highlights spread over two columns, resource cards in the third (33/33/33).', + 'description' => 'How the detail page arranges the Technical Highlights / Resources band. Layout 1 (default): Technical Highlights on the left, resource cards on the right (50/50). Layout 2: Technical Highlights spread over two columns, resource cards in the third (33/33/33). Layout 3 - Hardware option: Technical Highlights spread over two columns, NO resource cards (maintained cards are kept but not shown).', 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', @@ -479,6 +479,8 @@ return [ 'items' => [ ['label' => 'Layout 1 - 50/50 (Technical Highlights left, Resources right)', 'value' => '50-50'], ['label' => 'Layout 2 - 33/33/33 (Technical Highlights in two columns, Resources in the third)', 'value' => '33-33-33'], + // customer request 2026-11-02: hardware products have no resource cards + ['label' => 'Layout 3 - Hardware option (Technical Highlights in two columns, no Resources)', 'value' => 'hardware'], ], ], ], diff --git a/packages/vitec/Documentation/Headless-JSON-Architecture.md b/packages/vitec/Documentation/Headless-JSON-Architecture.md index 0dad53c..cb031a3 100755 --- a/packages/vitec/Documentation/Headless-JSON-Architecture.md +++ b/packages/vitec/Documentation/Headless-JSON-Architecture.md @@ -39,6 +39,7 @@ | 1.24 | 2026‑10‑23 | **Interface change (additive).** New frontend layout **22 Solution Group Page** for the eight solution group hero pages (zones hero = `colPos1`, main = `colPos0`). Element order: `vitec_markethero` + `vitec_introparagraph` in the hero zone; `vitec_marketintro` 2, `vitec_introparagraph` + 4 `text_only` cards (challenges), `vitec_introparagraph` + 4 alternating `horizontal`/`horizontal_reverse` cards (capabilities, bullets as `
    `), `vitec_usecaselist` (testimonials, shipped hidden until stories are picked), `vitec_marketinsights`, `vitec_ctabanner` in main — imported from the agency Template‑06 workbooks by `vitec:import-solution-group-workbooks`; page properties as on the sub‑solution pages. | | 1.25 | 2026‑10‑23 | **Interface change (additive).** The markets branch is aligned with the agreed agency structure: `/markets` eleven market hero pages their sub‑market pages (the use‑case level stays sections per 7.17). New frontend layout **23 Market Hero Page** (zones hero = `colPos1`, main = `colPos0`): `vitec_markethero` (CTA anchors `#submarkets`) + `vitec_introparagraph` (header carries the hero H1) in the hero zone; `vitec_marketintro`, `vitec_introparagraph`, sub‑market `vitec_card`s whose `primary_cta` links the child page, `vitec_ctabanner` in main (`vitec_customerlogos` and `vitec_usecaselist` ship hidden until filled editorially). Imported by `vitec:import-market-hero-workbooks`; the tree itself by `vitec:align-market-pages` (renames with slug redirects, child slugs normalised — this also repairs embedded‑slash slugs). Sub‑market pages gained the full page‑properties set. | | 1.26 | 2026‑10‑26 | **Interface change (additive).** Product detail resources band simplified (customer CR): the `resources` envelope gains **`sectionLayout`** — `50-50` (default) \| `33-33-33` — from the new per‑product select *Resources Section Layout* (Layout 1: Technical Highlights left, resource cards right, 50/50; Layout 2: highlights over two columns, cards in the third). Capabilities leave the band editorially; the TCA fields `capabilities`, `datasheets` and `downloads` are parked in the Misc tab — all three stay in the payload unchanged. The automatic newest‑datasheet/documentation cards remain deferred; meanwhile the manual card `restype` vocabulary gains `datasheet` and `brochure` — a pinned datasheet card links the download record and stays current because the download route always serves the newest file. | +| 1.27 | 2026‑11‑02 | **Interface change (additive).** Product *Resources Section Layout* gained the value `hardware` (“Layout 3 - Hardware option”): `resources.sectionLayout = "hardware"` — Technical Highlights over two columns, no resource cards (`resources.items` is emitted empty even when cards are maintained, so they reappear on a switch back). | This document is drafted in the style of, and adopts the terminology conventions of, ISO/IEC/IEEE 42010 (architecture description), ISO/IEC/IEEE 26514 (information for @@ -934,7 +935,7 @@ Produced by `ProductShowJsonRenderer::serializeProduct()`. Members: | `ogimage`, `videofile` | object \| null | FAL singletons | | `relatedprodukt` | array | card shape `{uid, title, slug, subtitle, teaser, description, link, images}`, backend order | | `solutions` | array | solution card shape `{uid, title, slug, subtitle, teaser, description, detailUrl, isGroup, image}` via `tx_vitec_product_solution_mm`, backend order; an editor may select individual Generic Solutions or the eight group‑level records (`isGroup: true`, linking to the group page) | -| `resources` | object | list envelope `{layout, items[]}`: hand‑written cards (`type` `documentation\|support\|datasheet\|brochure`, `title`, `text`, `icon`, resolved `url` per 9.12; a card without a resolvable link is dropped) followed by the `datasheets` MM selection of download records as `type: datasheet` cards (title/teaser/icon from the record, `url` = the public download route); `layout` is `carousel` above three cards in total; `sectionLayout` (`50-50` default \| `33-33-33`) mirrors the per‑product *Resources Section Layout* select — how the front end arranges the Technical Highlights / Resources band (1.26) — **detail payload only** | +| `resources` | object | list envelope `{layout, items[]}`: hand‑written cards (`type` `documentation\|support\|datasheet\|brochure`, `title`, `text`, `icon`, resolved `url` per 9.12; a card without a resolvable link is dropped) followed by the `datasheets` MM selection of download records as `type: datasheet` cards (title/teaser/icon from the record, `url` = the public download route); `layout` is `carousel` above three cards in total; `sectionLayout` (`50-50` default | `33-33-33` | `hardware`) mirrors the per‑product *Resources Section Layout* select — how the front end arranges the Technical Highlights / Resources band (1.26); `hardware` (1.27) spreads the Technical Highlights over two columns and carries NO resource cards (`items: []`, the band shows highlights only)\| `33-33-33`) mirrors the per‑product *Resources Section Layout* select — how the front end arranges the Technical Highlights / Resources band (1.26) — **detail payload only** | | `jsonLd` | string | ready‑to‑emit schema.org `@graph` (6.6), detail only | #### 7.15.2 List payload (`vitec_productlist`, key `products`) @@ -1615,4 +1616,4 @@ remediation. - Header convention — the uniform header section across CEs, plugins and containers. - `Configuration/Sets/Vitecset/setup.typoscript` — the single TypoScript entry point. -*End of document EVO‑VITEC‑HL‑001 v1.26.* +*End of document EVO‑VITEC‑HL‑001 v1.27.*