Wie alles begann

Vollständiges Setup TypoScript

< Zurück

Nachfolgend das vollständige TypoScript für das Setup im Root-Template meiner Seite.

# Definition
config.absRefPrefix = /
config.simulateStaticDocuments = 0
config.tx_realurl_enable = 1
config.disablePrefixComment = 1
config.prefixLocalAnchors = all
config.language = de
config.locale_all = de_DE
plugin.tx_news.settings.detail.showSocialShareButtons = 0

# Definition
temp.docHead = TEMPLATE
temp.docHead {
  template = FILE
  template.file = {$templateFile}
  workOnSubpart = DOCUMENT_HEADER
}

temp.mainMenu = HMENU
temp.mainMenu {
  1 = TMENU
  1 {
    wrap=<ul>|</ul>
    NO = 1
    NO {
      allWrap = <li> | </li>
    }
    ACT = 1
    ACT {
      allWrap = <li class="current"> | </li>
    }
  }
}

temp.subMenu = HMENU
temp.subMenu {
  entryLevel = 1
  1 = TMENU
  1 {
      wrap = <ul>|</ul>
      NO = 1
      NO {
        wrapItemAndSub = <li>|</li>
      }

      CUR = 1
      CUR {
        wrapItemAndSub = <li class="current"> | </li>
      }
      
      ACTIFSUB = 1
      ACTIFSUB {
        wrapItemAndSub = <li class="current">|</li>
      }
  }
  2 < .1
}

temp.staticMenu = HMENU
temp.staticMenu {
  includeNotInMenu = 1
  special = list
  special.value = {$staticMenuItems}
  1 = TMENU
  1 {
    wrap=<ul>|</ul>
    NO.allWrap = <li> | </li>
  }
}

temp.themeTitle = COA
temp.themeTitle {
  10 = TEXT
  10.if.isFalse.data = page:subtitle
  10.data = page:title
  20 = TEXT
  20.if.isTrue.data = page:subtitle
  20.data = page:subtitle
}

temp.docBody = TEMPLATE
temp.docBody {
  template = FILE
  template.file = {$templateFile}
  workOnSubpart = DOCUMENT_BODY
 
  marks {
    HEADING = TEXT
    HEADING.field = title
   
    DOCUMENT_TITLE < temp.themeTitle

    CONTENT < styles.content.get
   
    MAIN_NAVIGATION < temp.mainMenu
    SUB_NAVIGATION < temp.subMenu
    STATIC_NAVIGATION < temp.staticMenu
   
    COPYRIGHT_INFO = TEXT
    COPYRIGHT_INFO.value = {$copyRight}
   
    THEME_CLASS = TEXT
    THEME_CLASS.value = {$themeClass}
  }
}

page = PAGE
page {
  headerData = COA
  headerData.10 < temp.docHead
 
  10 < temp.docBody
}
(c) 2016 Richard Woitaschik