Skip to content

Instantly share code, notes, and snippets.

@daKmoR
Created September 27, 2013 09:15
Show Gist options
  • Save daKmoR/6726028 to your computer and use it in GitHub Desktop.
Save daKmoR/6726028 to your computer and use it in GitHub Desktop.
page = Page
page.head {
stylesheets = TYPO3.TypoScript:Template
stylesheets {
templatePath = 'resource://[...]/Private/Templates/Page/Default.html'
sectionName = 'stylesheets'
}
scripts = TYPO3.TypoScript:Template
scripts {
templatePath = 'resource://[...]/Private/Templates/Page/Default.html'
sectionName = 'scripts'
}
}
page.body {
templatePath = 'resource://[...]/Private/Templates/Page/Default.html'
sectionName = 'body'
parts {
menu = Menu
menu.entryLevel = 2
}
// These are your content areas, you can define as many as you want, just name them and the nodePath.
content {
main = ContentCollection
main.nodePath = 'main'
}
}
# Alternative template
pageAlternative < page {
bodyAttributes.class = 'home'
}
root.pageAlternativeCase {
condition = ${q(node).property('name') == 'homepage'}
renderPath = '/pageAlternative'
}
@daKmoR
Copy link
Author

daKmoR commented Sep 27, 2013

Solution:

# Alternative template
pageAlternative < page {
    bodyAttributes.class = 'home'
}

root.pageAlternativeCase {
    condition =  ${node.name == 'homepage'}
    renderPath = '/pageAlternative'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment