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 <noreply@anthropic.com>
This commit is contained in:
orascheandClaude Opus 5.5 committed 2026-10-09 13:33:44 +02:00
1 parent 490bac500e
commit b5fcdb2b5a
1 file changed
+6 -1
@@ -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' => [