@@ -54,6 +54,9 @@ public function renderGrid(array $record, PageLayoutContext $context): string
5454 foreach ($ containerGrid as $ cols ) {
5555 $ rowObject = GeneralUtility::makeInstance (GridRow::class, $ context );
5656 foreach ($ cols as $ col ) {
57+ if ($ context ->getDrawingConfiguration ()->isLanguageComparisonMode ()) {
58+ $ rowObject = GeneralUtility::makeInstance (GridRow::class, $ context );
59+ }
5760 $ defVals = $ this ->getDefValsForContentDefenderAllowsOnlyOneSpecificContentType ($ record ['CType ' ], (int )$ col ['colPos ' ]);
5861 $ url = $ this ->newContentUrlBuilder ->getNewContentUrlAtTopOfColumn ($ context , $ container , (int )$ col ['colPos ' ], $ defVals );
5962 $ columnObject = GeneralUtility::makeInstance (ContainerGridColumn::class, $ context , $ col , $ container , $ url , $ defVals !== null );
@@ -66,8 +69,13 @@ public function renderGrid(array $record, PageLayoutContext $context): string
6669 $ columnObject ->addItem ($ columnItem );
6770 }
6871 }
72+ if ($ context ->getDrawingConfiguration ()->isLanguageComparisonMode ()) {
73+ $ grid ->addRow ($ rowObject );
74+ }
75+ }
76+ if ($ context ->getDrawingConfiguration ()->isLanguageComparisonMode () === false ) {
77+ $ grid ->addRow ($ rowObject );
6978 }
70- $ grid ->addRow ($ rowObject );
7179 }
7280
7381 $ gridTemplate = $ this ->tcaRegistry ->getGridTemplate ($ record ['CType ' ]);
@@ -87,7 +95,9 @@ public function renderGrid(array $record, PageLayoutContext $context): string
8795 // keep compatibility
8896 $ view ->assign ('containerGrid ' , $ grid );
8997 $ view ->assign ('grid ' , $ grid );
90- $ view ->assign ('gridColumns ' , array_fill (1 , $ grid ->getSpan (), null ));
98+ if ($ context ->getDrawingConfiguration ()->isLanguageComparisonMode () === false ) {
99+ $ view ->assign ('gridColumns ' , array_fill (1 , $ grid ->getSpan (), null ));
100+ }
91101 $ view ->assign ('containerRecord ' , $ record );
92102 $ view ->assign ('context ' , $ context );
93103 $ beforeContainerPreviewIsRendered = new BeforeContainerPreviewIsRenderedEvent ($ container , $ view , $ grid );
0 commit comments