Megamenu goes visual: spotlight layout, page images on pagetree columns

- customer wish (via Olli, 2026-10-27): a more visual main menu in the
  style of rossvideo.com - image cards instead of plain link lists; for
  Insights a left-rail submenu whose hover swaps a visual area showing
  the latest news and the next events
- new entry layout "spotlight" in evo_megamenu_json, built strictly on
  the catalog pattern so the extension stays project-neutral: `nav` is
  a flat rail from the linked page's live children (abstract as teaser,
  first page media as 640px-webp image from stage 2 - the hover swap
  material), `spotlight` is emitted verbatim from the new
  BuildSpotlightEvent (null without a listener); curated columns are
  ignored like on pagetree
- new vitec listener ProvideInsightsSpotlight supplies the cards: the
  three latest news (storage pid 11, type 0 - the Solr convention;
  link /news/article/<path_segment> per the NewsDetail route enhancer;
  fal_media as processed 640px webp) and the next two events
  (hideonwebsite = 0, upcoming by eventstart/eventend; link = eventurl
  or the events page)
- pagetree columns can now carry an image (stage 2+, first page media
  of the column's page): attach images in the page properties and the
  markets/solutions panels turn into image cards without further code
- TCA select and label extended; README brought up to date (the
  pagetree layout had never been documented) with the spotlight JSON
  contract, reference mirror synced; frontend briefing updated
- activation is editorial: switch the Insights menu entry to the
  spotlight layout and link it to the Insights page

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
orascheandClaude Fable 5 committed 2026-10-27 11:47:23 +01:00
1 parent 90c2f97c5b
commit 6423b7c7f8
6 files changed
+362 -14

No files matched your search

+44 -4
View File
@@ -17,10 +17,12 @@ A plugin called **Megamenu**. Inside it:
| **Teaser card** | kicker, headline, text, link, image — for editorial panels |
| **Featured** | one highlighted block per entry, edited on the entry itself |
Three panel layouts per entry: `columns` for a structure menu (products,
solutions, markets), `teasers` for a small link column next to cards
(news, stories), and `catalog` for a data-driven panel whose content comes
from the site package (see below).
Five panel layouts per entry: `columns` for a curated structure menu,
`teasers` for a small link column next to cards (news, stories),
`pagetree` for a structure menu built live from the page tree,
`catalog` for a data-driven panel whose content comes from the site
package, and `spotlight` for a visual panel with a left-rail nav and live
content cards (see below).
## Installation
@@ -115,6 +117,44 @@ final class ProvideCatalog
`getEntry()` hands the listener the raw entry row (to tell several catalog
entries apart), `getStage()` the content stage.
### Layout `pagetree`
A structure panel that can never age against the site: the columns mirror
the live subtree of the page the entry links to - one column per child
page, its children as the items. Hidden or nav-hidden pages leave the menu
with the next cache flush. Curated columns are ignored; teasers and the
featured slot stay editorial. From stage 2 a child page with media gets its
first image as `image` on the column - attach images in the page
properties and the panel turns visual by itself.
### Layout `spotlight`
A visual panel ("rossvideo style"): `nav` is a flat left rail built live
from the linked page's children - each item with `title`, `link` and, from
stage 2, the page `abstract` as `teaser` plus the first page media as
`image`, so the front end can swap the visual area on hover. Next to it the
extension emits `spotlight`, filled by the site package: it dispatches
`Evomedien\EvoMegamenuJson\Event\BuildSpotlightEvent` per spotlight entry
and emits whatever a listener sets via `setSpotlight()` verbatim
(`null` without a listener). Curated columns are ignored.
The VITEC site package ships `ProvideInsightsSpotlight`, which supplies
```json
"spotlight": {
"news": [ {"title", "date", "link", "teaser?", "image?"} ],
"events": [ {"title", "start", "end", "venue", "booth", "city",
"country", "attendanceMode", "link", "teaser?", "image?"} ]
}
```
- `news`: the three latest news records (storage pid 11, type 0 - the Solr
convention), `link` = `/news/article/<path_segment>` per the NewsDetail
route enhancer, image from `fal_media` as processed 640px webp.
- `events`: the next two events (`hideonwebsite` = 0, upcoming by
eventstart/eventend), `link` = the record's `eventurl` or the events
page, image processed the same way.
## Notes
* Every link is a resolved URL — page, record, external or file, run through