Megamenu: rail display for page trees, cache tags, editorial promo boxes
- Page-tree entries get a "Page tree display" field (columns | rail |
rail-compact), emitted as display + cardSize: Markets and Solutions
show their main pages as a list and the sub-pages as image cards on
hover. Page-tree items carry image (page media) and teaser (abstract)
from stage 2. Additive; front ends ignoring display render columns.
- vitec:attach-page-media gains --depth=2 and falls back to the page's
hero background before the grey placeholder; the 39 sub-solution
pages got their hero image as page media.
- MegamenuJsonRenderer tags every page carrying the menu with the menu
tables and tt_content_<uid>, so saving menu records refreshes all
pages instead of waiting for a full flush.
- Products catalog: drop catalog.news; both promo boxes ("Product
highlight", "Product news") are the entry's editorial teaser cards.
ProvideInsightsSpotlight back to its previous state.
- Spec v1.29 and v1.30 (header version corrected), README.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9fb7f0ca77
commit
9211c8a395
10 files changed
+171
-37
No files matched your search
@@ -136,6 +136,19 @@ final class MenuBuilder
|
||||
'columns' => $columns,
|
||||
];
|
||||
|
||||
// Page-tree display (2026-11-02): same columns, two presentations -
|
||||
// `columns` side by side, or `rail`: the columns as a list on the
|
||||
// left, the hovered column's items as image cards on the right
|
||||
// (`cardSize` regular|compact). Additive: a front end that does not
|
||||
// know `display` keeps rendering columns.
|
||||
if ($layout === 'pagetree') {
|
||||
$display = (string)($entry['tree_display'] ?? 'columns');
|
||||
$built['display'] = str_starts_with($display, 'rail') ? 'rail' : 'columns';
|
||||
if ($built['display'] === 'rail') {
|
||||
$built['cardSize'] = $display === 'rail-compact' ? 'compact' : 'regular';
|
||||
}
|
||||
}
|
||||
|
||||
// Catalog panels: the teaser cards serve as the featured tiles (left
|
||||
// column), the catalog data itself comes from a listener of
|
||||
// BuildCatalogEvent - this extension does not know the data source.
|
||||
@@ -229,10 +242,20 @@ final class MenuBuilder
|
||||
foreach ($this->pageRepository->getMenu($rootUid, '*', 'sorting', self::NAV_WHERE) as $child) {
|
||||
$items = [];
|
||||
foreach ($this->pageRepository->getMenu((int)$child['uid'], '*', 'sorting', self::NAV_WHERE) as $grandchild) {
|
||||
$items[] = [
|
||||
$item = [
|
||||
'title' => (string)(($grandchild['nav_title'] ?? '') !== '' ? $grandchild['nav_title'] : $grandchild['title']),
|
||||
'link' => $this->url('t3://page?uid=' . (int)$grandchild['uid'], $cObj),
|
||||
];
|
||||
// card data for the `rail` display (2026-11-02), same rules
|
||||
// as the spotlight nav: abstract as teaser, page media image
|
||||
if ($stage >= 2) {
|
||||
$teaser = trim((string)($grandchild['abstract'] ?? ''));
|
||||
if ($teaser !== '') {
|
||||
$item['teaser'] = $teaser;
|
||||
}
|
||||
$item['image'] = $this->image('pages', 'media', (int)$grandchild['uid']);
|
||||
}
|
||||
$items[] = $item;
|
||||
}
|
||||
$column = [
|
||||
'title' => (string)(($child['nav_title'] ?? '') !== '' ? $child['nav_title'] : $child['title']),
|
||||
|
||||
Reference in new issue
Block a user