Skip to content

Commit

Permalink
TASK: Replace Neos.Node.inBackend
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Sep 16, 2023
1 parent 7a6c923 commit 58cb5f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Resources/Private/Fusion/Prototypes/Page.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ prototype(Neos.Neos:Page) {

@process.json = ${Json.stringify(value)}
@process.wrapInJsObject = ${'<script>window[\'@Neos.Neos.Ui:DocumentInformation\']=' + value + '</script>'}
@if.inBackend = ${Neos.Node.inBackend(documentNode)}
@if.inBackend = ${renderingMode.isEdit || renderingMode.isPreview}

// We need to ensure the JS backend information is always up to date, especially
// when child nodes change. Otherwise errors like the following might happen:
Expand All @@ -35,11 +35,11 @@ prototype(Neos.Neos:Page) {
entryIdentifier {
jsBackendInfo = 'javascriptBackendInformation'
documentNode = ${Neos.Caching.entryIdentifierForNode(documentNode)}
inBackend = ${Neos.Node.inBackend(documentNode)}
inBackend = ${renderingMode.isEdit || renderingMode.isPreview}
}
entryTags {
1 = ${Neos.Caching.nodeTag(documentNode)}
2 = ${Neos.Node.inBackend(documentNode) ? Neos.Caching.descendantOfTag(documentNode) : null}
2 = ${(renderingMode.isEdit || renderingMode.isPreview) ? Neos.Caching.descendantOfTag(documentNode) : null}
}
}
}
Expand All @@ -51,18 +51,18 @@ prototype(Neos.Neos:Page) {
compiledResourcePackage = ${Neos.Ui.StaticResources.compiledResourcePackage()}

sectionName = 'guestFrameApplication'
@if.inBackend = ${Neos.Node.inBackend(documentNode)}
@if.inBackend = ${renderingMode.isEdit || renderingMode.isPreview}
}
}

neosBackendContainer = '<div id="neos-backend-container"></div>'
neosBackendContainer.@position = 'before closingBodyTag'
[email protected] = ${Neos.Node.inBackend(documentNode)}
[email protected] = ${renderingMode.isEdit || renderingMode.isPreview}

neosBackendNotification = Neos.Fusion:Template {
@position = 'before closingBodyTag'
templatePath = 'resource://Neos.Neos.Ui/Private/Templates/Backend/GuestNotificationScript.html'
@if.inBackend = ${Neos.Node.inBackend(documentNode)}
@if.inBackend = ${renderingMode.isEdit || renderingMode.isPreview}
}

@exceptionHandler = 'Neos\\Neos\\Ui\\Fusion\\ExceptionHandler\\PageExceptionHandler'
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Fusion/Prototypes/Shortcut.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ prototype(Neos.Neos:Page) {
}

@if {
inBackend = ${Neos.Node.inBackend(documentNode)}
inBackend = ${renderingMode.isEdit || renderingMode.isPreview}
isShortcut = ${q(node).is('[instanceof Neos.Neos:Shortcut]')}
}
}
Expand Down

0 comments on commit 58cb5f2

Please sign in to comment.