From b5fcdb2b5ad3fb16e7a2b05948a541855eebf531 Mon Sep 17 00:00:00 2001 From: Oliver Rasche Date: Fri, 9 Oct 2026 13:33:44 +0200 Subject: [PATCH] Megamenu entry: reload the form when the layout changes The teaser cards field depends on the layout via displayCond; it now appears right after switching to catalog/teasers instead of only after saving. Co-Authored-By: Claude Opus 5.5 --- .../Configuration/TCA/tx_evomegamenujson_entry.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/evo_megamenu_json/Configuration/TCA/tx_evomegamenujson_entry.php b/packages/evo_megamenu_json/Configuration/TCA/tx_evomegamenujson_entry.php index 4901995..57a9f8a 100644 --- a/packages/evo_megamenu_json/Configuration/TCA/tx_evomegamenujson_entry.php +++ b/packages/evo_megamenu_json/Configuration/TCA/tx_evomegamenujson_entry.php @@ -94,6 +94,9 @@ return [ 'layout' => [ 'label' => $ll . 'layout', 'description' => $ll . 'layout.description', + // the teaser cards field depends on the layout (displayCond) - + // reload so it appears right away, without saving first + 'onChange' => 'reload', 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', @@ -101,6 +104,7 @@ return [ 'items' => [ ['label' => $ll . 'layout.columns', 'value' => 'columns'], ['label' => $ll . 'layout.teasers', 'value' => 'teasers'], + ['label' => $ll . 'layout.catalog', 'value' => 'catalog'], ], ], ], @@ -127,7 +131,8 @@ return [ ], ], 'menu_teasers' => [ - 'displayCond' => 'FIELD:layout:=:teasers', + // catalog: the cards are the featured tiles of the left column + 'displayCond' => 'FIELD:layout:IN:teasers,catalog', 'label' => $ll . 'menu_teasers', 'description' => $ll . 'menu_teasers.description', 'config' => [