[Neos] if query not working in section "bodyScripts"?

Tina Eckhorst t.eckhorst at magent.de
Wed Nov 26 10:06:37 CET 2014


Hi,

I have a JavaScript that should only be executed in Frontend and not in Backend.
I tried the following but the JavaScript is not loaded. Without the if query it's working but of course then it's also loaded in the Backend.

<f:section name="bodyScripts">
  [...]
  <script src="{f:uri.resource(path: 'JavaScript/main.js', package: 'TYPO3.NeosDemoTypo3Org')}"></script>
  <f:if condition="{node.context.workspace.name} == 'live'">
    <script src="{f:uri.resource(path: 'JavaScript/main-only-fe.js', package: 'TYPO3.NeosDemoTypo3Org')}"></script>
  </f:if>
</f:section>

Thanks!


More information about the Neos mailing list