Fusion check if in Backend or Live/Frontend rendered

You only need any! node at hand - which doesnt matter.

via this eel you can get the wanted output.

${node.context.Live}

${node.context.InBackend}

implemented in Neos.Neos/Classes/Domain/Service/ContentContext.php

i know this exists Get “rendering in Backend” in Fusion? - Using Neos & Flow - Discuss Neos – the official forum of the Neos project but its not easily findable.

1 Like

Thanks for this info post :slight_smile:

Just a little note: It should be lower camel cased, so ${node.context.live} or ${node.context.inBackend}

1 Like

why doesnt the case matter? :sweat_smile:

I prefer using a helper like this who checks for currentRenderingMode too.
With this, the “backend” is false in Preview Mode (inside the backend).

backend = Ongoing.Base:Helper.Backend

prototype(Vendor.Project:Helper.Backend) < prototype(Neos.Fusion:Component) {
    renderer = ${node.context.inBackend && node.context.currentRenderingMode.edit ? true : false}
}