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:
1 parent
490bac500e
commit
b5fcdb2b5a
1 file changed
+6
-1
@@ -94,6 +94,9 @@ return [
|
|||||||
'layout' => [
|
'layout' => [
|
||||||
'label' => $ll . 'layout',
|
'label' => $ll . 'layout',
|
||||||
'description' => $ll . 'layout.description',
|
'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' => [
|
'config' => [
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'renderType' => 'selectSingle',
|
'renderType' => 'selectSingle',
|
||||||
@@ -101,6 +104,7 @@ return [
|
|||||||
'items' => [
|
'items' => [
|
||||||
['label' => $ll . 'layout.columns', 'value' => 'columns'],
|
['label' => $ll . 'layout.columns', 'value' => 'columns'],
|
||||||
['label' => $ll . 'layout.teasers', 'value' => 'teasers'],
|
['label' => $ll . 'layout.teasers', 'value' => 'teasers'],
|
||||||
|
['label' => $ll . 'layout.catalog', 'value' => 'catalog'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@@ -127,7 +131,8 @@ return [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
'menu_teasers' => [
|
'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',
|
'label' => $ll . 'menu_teasers',
|
||||||
'description' => $ll . 'menu_teasers.description',
|
'description' => $ll . 'menu_teasers.description',
|
||||||
'config' => [
|
'config' => [
|
||||||
|
|||||||
Reference in new issue
Block a user