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

@@ -0,0 +1,54 @@
<?php
declare(strict_types=1);
namespace Evomedien\EvoMegamenuJson\Event;
/**
* Dispatched for every entry with the panel layout `spotlight`.
*
* Same contract idea as BuildCatalogEvent: the extension knows that a
* spotlight panel exists (left-rail nav from the linked page's children,
* visual card area on the right), not where the cards come from. A site
* package listens and supplies the card sections (latest news, upcoming
* events, ...) as a plain array; it is emitted verbatim as `spotlight` on
* the entry. Without a listener the entry carries `spotlight: null` and the
* front end falls back to the nav items' own images.
*/
final class BuildSpotlightEvent
{
/** @var array<string,mixed>|null */
private ?array $spotlight = null;
/**
* @param array<string,mixed> $entry the raw tx_evomegamenujson_entry row
*/
public function __construct(
private readonly array $entry,
private readonly int $stage,
) {}
/** @return array<string,mixed> */
public function getEntry(): array
{
return $this->entry;
}
/** Content stage of the menu (1 structure, 2 + images/teasers, 3 + featured). */
public function getStage(): int
{
return $this->stage;
}
/** @return array<string,mixed>|null */
public function getSpotlight(): ?array
{
return $this->spotlight;
}
/** @param array<string,mixed> $spotlight */
public function setSpotlight(array $spotlight): void
{
$this->spotlight = $spotlight;
}
}