Advertisement
Guest User

TS2 Footer

a guest
Jun 21st, 2014
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Root TypoScript template for the Example site
  3.  */
  4. include: LangMenu.ts2
  5. include: MainMenu.ts2
  6.  
  7.  
  8. prototype(TYPO3.Example:GermanFooter) < prototype(TYPO3.Neos:ContentCollection) {
  9.     @cache {
  10.         mode = 'cached'
  11.     }
  12.     nodePath = '/site/example/de'
  13.     collection = ${q(site).find('de').children('footer').children(['instanceOf TYPO3.Example:Footer'])}
  14. }
  15.  
  16. prototype(TYPO3.Example:EnglishFooter) < prototype(TYPO3.Neos:ContentCollection) {
  17.     @cache {
  18.         mode = 'cached'
  19.     }
  20.     nodePath = '/site/example/en'
  21.     collection = ${q(site).find('en').children('footer').children(['instanceOf TYPO3.Example:Footer'])}
  22. }
  23.  
  24. prototype(TYPO3.Example:DefaultFooter) < prototype(TYPO3.Neos:ContentCollection) {
  25.     @cache {
  26.          mode = 'cached'
  27.     }
  28.     nodePath = '/site/example/dk'
  29.     collection = ${q(site).find('dk').children('footer').children(['instanceOf TYPO3.Example:Footer'])}
  30. }
  31.  
  32. page = Page {
  33.     head {
  34.         stylesheets.site = TYPO3.TypoScript:Template {
  35.             templatePath = 'resource://TYPO3.Example/Private/Templates/Page/Default.html'
  36.             sectionName = 'stylesheets'
  37.         }
  38.  
  39.         javascripts.site = TYPO3.TypoScript:Template {
  40.             templatePath = 'resource://TYPO3.Example/Private/Templates/Page/Default.html'
  41.             sectionName = 'headScripts'
  42.         }
  43.     }
  44.  
  45.     body {
  46.         templatePath = 'resource://TYPO3.Example/Private/Templates/Page/Default.html'
  47.         sectionName = 'body'
  48.         parts {
  49.             menu < mainMenu
  50.             langMenu < langMenu
  51.         }
  52.         // These are your content areas, you can define as many as you want, just name them and the nodePath.
  53.         content {
  54.             // The default content section
  55.             main = PrimaryContent {
  56.                 nodePath = 'main'
  57.             }
  58.         }
  59.         footer = TYPO3.TypoScript:Case {
  60.             de {
  61.                 condition = ${${Array.indexOf(q(node).parents().get(), q(site).find('de').get(0))} != -1}
  62.                 type = TYPO3.Example:GermanFooter
  63.             }
  64.             en {
  65.                 condition = ${${Array.indexOf(q(node).parents().get(), q(site).find('en').get(0))} != -1}
  66.                 type = TYPO3.Example:EnglishFooter
  67.             }
  68.             default {
  69.                 @position = 'end 9999'
  70.                 condition = ${true}
  71.                 type = TYPO3.Example:DefaultFooter
  72.             }
  73.         }
  74.  
  75.         javascripts.site = TYPO3.TypoScript:Template {
  76.             templatePath = 'resource://TYPO3.Example/Private/Templates/Page/Default.html'
  77.             sectionName = 'bodyScripts'
  78.         }
  79.     }
  80. }
  81.  
  82. default < page
  83. landingPage < page
  84. landingPage.body {
  85.     templatePath = 'resource://TYPO3.Example/Private/Templates/Page/Homepage.html'
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement