﻿


BU Web Kurs




TYPO3 SNIPPETS






# Content aus Normal-Spalte

page = PAGE
page.10 < styles.content.get








# COA Objekt mit verschiedenen Inhalten

myTitle = TEXT
myTitle{
  wrap = <h1>|</h1>
  field = subtitle // title
}

myContent = COA
myContent{
  30 < myTitle
  50 < styles.content.get
}













# HTML-Template laden und Inhalte zuweisen

page = PAGE
page{
  10 = TEMPLATE
  10{
    template = FILE
    template.file = templates/main.html

    marks.MYCONTENT < myContent
  }
}












# Menü aus Inhaltsstruktur erstellen

myMenu = HMENU
myMenu {
    wrap = <ul>|</ul>
    1 = TMENU
    1 {
      expAll = 1
      NO {
        wrapItemAndSub = <li>|</li>
        ATagTitle.field = title
      }
      ACT = 1
      ACT {
        linkWrap = <li>|</li>
        ATagParams = class="current"
      }
    }
}











# statische Seite

temp.staticPage = CONTENT
temp.staticPage {
    table = tt_content
    select {
        pidInList = 2
        orderBy = sorting
        # 0 normal   1 left    2 right
        where = colPos = 0
    }
}




# statischer Eintrag

temp.staticContent = RECORDS
temp.staticContent {
    tables = tt_content
    source = 5
} 
