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 <noreply@anthropic.com>
This commit is contained in:
1 parent
d87e64f73b
commit
da2ebdca23
3 files changed
+26
-9
No files matched your search
@@ -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<int,array<string,mixed>>,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)
|
||||
|
||||
Reference in new issue
Block a user