Created
October 9, 2014 07:25
-
-
Save skurfuerst/ed09a19d1df80aefd49e to your computer and use it in GitHub Desktop.
Show CSS / JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This stylesheet is only loaded when the Neos UI is shown | |
page.head.stylesheets.backend = TYPO3.TypoScript:Tag { | |
tagName = 'link' | |
attributes { | |
rel = 'stylesheet' | |
href = TYPO3.TypoScript:ResourceUri { | |
package = 'Acme.Demo' | |
path = 'Styles/Backend.css' | |
} | |
} | |
# !! This is the magic line :-) | |
@process.1 = ${node.context.workspaceName != 'live' ? value : ''} | |
} | |
# This main JS will load everywhere | |
page.body.javascripts.main = TYPO3.TypoScript:Tag { | |
tagName = 'script' | |
attributes { | |
src = TYPO3.TypoScript:ResourceUri { | |
package = ‘Acme.Demo' | |
path = 'JavaScript/Main.min.js' | |
} | |
async = null | |
} | |
} | |
# The async JS will only load for the website, NOT when the Neos UI is shown | |
page.body.javascripts.async = TYPO3.TypoScript:Template { | |
templatePath = 'resource://Acme.Demo/Private/Templates/Page/Default.html' | |
sectionName = 'async' | |
@process.1 = ${node.context.workspaceName != 'live' ? '' : value} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment