Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions Classes/Backend/Preview/GridRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public function renderGrid(array $record, PageLayoutContext $context): string
foreach ($containerGrid as $cols) {
$rowObject = GeneralUtility::makeInstance(GridRow::class, $context);
foreach ($cols as $col) {
if ($context->getDrawingConfiguration()->isLanguageComparisonMode()) {
$rowObject = GeneralUtility::makeInstance(GridRow::class, $context);
}
$defVals = $this->getDefValsForContentDefenderAllowsOnlyOneSpecificContentType($record['CType'], (int)$col['colPos']);
$url = $this->newContentUrlBuilder->getNewContentUrlAtTopOfColumn($context, $container, (int)$col['colPos'], $defVals);
$columnObject = GeneralUtility::makeInstance(ContainerGridColumn::class, $context, $col, $container, $url, $defVals !== null);
Expand All @@ -66,8 +69,13 @@ public function renderGrid(array $record, PageLayoutContext $context): string
$columnObject->addItem($columnItem);
}
}
if ($context->getDrawingConfiguration()->isLanguageComparisonMode()) {
$grid->addRow($rowObject);
}
}
if ($context->getDrawingConfiguration()->isLanguageComparisonMode() === false) {
$grid->addRow($rowObject);
}
$grid->addRow($rowObject);
}

$gridTemplate = $this->tcaRegistry->getGridTemplate($record['CType']);
Expand All @@ -87,7 +95,9 @@ public function renderGrid(array $record, PageLayoutContext $context): string
// keep compatibility
$view->assign('containerGrid', $grid);
$view->assign('grid', $grid);
$view->assign('gridColumns', array_fill(1, $grid->getSpan(), null));
if ($context->getDrawingConfiguration()->isLanguageComparisonMode() === false) {
$view->assign('gridColumns', array_fill(1, $grid->getSpan(), null));
}
$view->assign('containerRecord', $record);
$view->assign('context', $context);
$beforeContainerPreviewIsRendered = new BeforeContainerPreviewIsRenderedEvent($container, $view, $grid);
Expand Down
Loading