Skip to content

Commit

Permalink
TASK: Remove deprecated editPreviewMode variable
Browse files Browse the repository at this point in the history
The TypoScript context variable `editPreviewMode` was deprecated in favour of `${documentNode.context.currentRenderingMode.name}`

 With neos 9 that again was removed in favour of the fusion global `renderingMode`.

neos#4505
  • Loading branch information
mhsdesign committed Feb 16, 2024
1 parent 0c11068 commit e04053c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Neos.Neos/Classes/View/FusionExceptionView.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ public function render()
[
'node' => $currentSiteNode,
'documentNode' => $currentSiteNode,
'site' => $currentSiteNode,
'editPreviewMode' => null
'site' => $currentSiteNode
]
));

Expand Down
3 changes: 1 addition & 2 deletions Neos.Neos/Classes/View/FusionView.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ public function render(): string|ResponseInterface
$fusionRuntime->pushContextArray([
'node' => $currentNode,
'documentNode' => $this->getClosestDocumentNode($currentNode) ?: $currentNode,
'site' => $currentSiteNode,
'editPreviewMode' => $this->variables['editPreviewMode'] ?? null
'site' => $currentSiteNode
]);
try {
$output = $fusionRuntime->render($this->fusionPath);
Expand Down

0 comments on commit e04053c

Please sign in to comment.