Skip to content

Commit

Permalink
[WIP] backend template
Browse files Browse the repository at this point in the history
  • Loading branch information
achimfritz committed Jan 30, 2025
1 parent b1e3b4a commit f1918f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 4 additions & 3 deletions Classes/Backend/Preview/ContainerPreviewRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ public function __construct(GridRenderer $gridRenderer) {

public function renderPageModulePreviewContent(GridColumnItem $item): string
{
$content = parent::renderPageModulePreviewContent($item);
$grid = $this->gridRenderer->renderGrid($item->getRecord(), $item->getContext(), $item);
return $content . $grid;
$record = $item->getRecord();
$record['tx_container_grid'] = $this->gridRenderer->renderGrid($record, $item->getContext(), $item);
$item->setRecord($record);
return parent::renderPageModulePreviewContent($item);
}
}
6 changes: 0 additions & 6 deletions Resources/Private/Templates/Container.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,5 @@
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true"
>
<f:comment>
note: the tx_container_grid variable not set for TYPO3 v11,
in TYPO3 v11 the ContainerPreviewRenderer renders the container grid after content from StandardContentPreviewRenderer
in TYPO3 > v11 this variable is assigned in PageContentPreviewRendering EventListener
in this case of backendLayout is set, not ContainerPreviewRenderer is used
</f:comment>
<f:format.raw>{tx_container_grid}</f:format.raw>
</html>

0 comments on commit f1918f6

Please sign in to comment.