Skip to content

Instantly share code, notes, and snippets.

@christophengelmayer
Created June 20, 2017 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christophengelmayer/8c19a62722386339d11c9e1952b71dd9 to your computer and use it in GitHub Desktop.
Save christophengelmayer/8c19a62722386339d11c9e1952b71dd9 to your computer and use it in GitHub Desktop.
NEOS Basic Templating
prototype(Your.Site:AbstractPage) < prototype(Page) {
head {
headTags = ${'
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
'}
stylesheets {
css = Neos.Fusion:Tag {
tagName = 'link'
attributes {
href = Neos.Fusion:ResourceUri {
path = 'resource://Your.Site/Public/css/styles.css'
}
type = 'text/css'
rel = 'stylesheet'
}
}
}
}
body {
javascripts {
main = Neos.Fusion:Tag {
tagName = 'script'
attributes.src = Neos.Fusion:ResourceUri {
path = 'resource://Your.Site/Public/js/main.js'
}
}
}
}
}
prototype(Neos.NodeTypes:Page.Document) < prototype(Your.Site:AbstractPage) {
body = Your.Site:Page
}
prototype(Your.Site:Page) < prototype(Neos.Fusion:Template) {
templatePath = 'resource://Your.Site/Private/Fusion/Page/Page.html'
main = Neos.Neos:ContentCollection {
nodePath = 'main'
}
}
{main -> f:format.raw()}
include: **/*.fusion
root {
default {
type = ${node.nodeType.name + '.Document'}
renderPath >
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment