Inhalt von Seiten via Menü auslesen

TSConfig

TCEFORM {
	tt_content {
		menu_type {
			addItems.50 = Teaser last 3 Pages (1,3) || Teaser letzte 3 Seiten (1,3)
			addItems.51 = Teaser last 3 Pages (2) || Teaser letzte 3 Seiten (2)
			addItems.55 = Pages with Content || Seite und Seiteninhalt der Unterseiten
		}
	}
}


TSConfig
typoscript Code

tt_content.menu.20 {

	# Neues Menü für Page Teaser (ungerade seiten)
	50 = HMENU
	50 {
		special = directory
		special.value.field = pages

		# Maximale Anzahl der Seiten
		maxItems = 3
		wrap = <div class="pageItems">|</div>
		wrap.insertData = 1

		1 = TMENU
		1 {
			noBlur = 1

			NO = 1
			NO {
				noBlur = 1
				doNotLinkIt = 1
				doNotShowLink = 1

				allWrap  = <div class="pItem pItemFirst">|</div>|*|<div class="pItem">|</div>|*|<div class="pItem pItemLast">|</div>
				allWrap.if {
					# gibt ungerade (1,3,5) seiten aus / 1 = gerade
					negate = 0
					isTrue {
						prioriCalc=1
						cObject=TEXT
						cObject.insertData=1
						cObject.value={register:count_HMENU_MENUOBJ}%2
					}
				}

				stdWrap2.cObject = COA
				stdWrap2.cObject {

					if {
						# gibt ungerade (1,3,5) seiten aus / 1 = gerade
						negate = 0
						isTrue {
							prioriCalc=1
							cObject=TEXT
							cObject.insertData=1
							cObject.value={register:count_HMENU_MENUOBJ}%2
						}
					}

					10 = IMAGE
					10 {
						titleText.field = title

						file = GIFBUILDER
						file {
							XY = [10.w],[10.h]
							quality = 95
							# Hintergrundfarbe für Maske
							backColor = #fefefe

							# Variante mit DAM
							10 = IMAGE
							10 {
								file {
									import.cObject = USER
									import.cObject.userFunc = tx_dam_tsfe->fetchFileList
									# siehe feld <tablenames> in sql-tabelle <tx_dam_mm_ref>
									import.cObject.refTable = pages
									# siehe feld <ident> in sql-tabelle <tx_dam_mm_ref>
									import.cObject.refField = pages_media
									import.listNum = 0
								}
								# Fixe Breite
								file.width = 160
								file.width.wrap = |c
								# Fixe Höhe
								file.height = 207
								file.height.wrap = |c
								# Maske hinzufügen
								mask = EXT:myext/pfad-zu-datei/mask.png
								# Position der Maske
								align = r,b
							}
						}

					}

					20 = COA
					20 {
						wrap = <div class="csc-textpic-text">|</div>

						10 = TEXT
						10.data = field:nav_title // field:title
						10.wrap = <h3 class="header">|</h3>
						10.typolink.parameter.field = uid

						20 = TEXT
						20.data = field:author
						20.wrap = <h4 class="author">|</h4>

						30 = TEXT
						30.field = abstract
						30.br = 1
						30.crop = 240 | ... | 1
						30.wrap = <p>|</p>
					}

				}
			}

		}
	}

	# Neues Menü für Page Teaser (gerade seiten)
	51 < tt_content.menu.20.50
	51 {
		1.NO.allWrap.if.negate = 1
		1.NO.stdWrap2.cObject.if.negate = 1
	}

	# Menü für Page Ãœbersicht
	55 = HMENU
	55 {
		special = directory
		special.value.field = pages

		# Maximale Anzahl der Seiten
		maxItems = 5
		wrap = <div class="pageItems">|</div>
		wrap.insertData = 1

		1 = TMENU
		1 {
			noBlur = 1

			NO = 1
			NO {
				noBlur = 1
				doNotLinkIt = 1
				doNotShowLink = 1

				allWrap  = <div class="pItem pItemFirst">|</div>|*|<div class="pItem">|</div>|*|<div class="pItem pItemLast">|</div>

				stdWrap2.cObject = COA
				stdWrap2.cObject {

					10 = CONTENT
					10 {
						table = tt_content
						select{
							pidInList.field = uid
							# Sortierung
							orderBy = sorting
							where = colPos=0
							languageField = sys_language_uid
						}
					}

				}
			}

		}
	}

}

typoscript