Zum Inhalt springen

Typoscript renderObj Seiten Titel an UserFunc übergeben

Erstellt am 23. April 2015 · 3 Antworten · letzte Antwort am 27. April 2015

Tags: TYPO3 6.x, Frage

sthi1992 ·

Guten Tag

Habe ein Problem, und zwar will ich mit Hilfe dieses TypoScripts den Seiten Titel an die UserFunc übergeben...

lib.OnePagerContent = COA
lib.OnePagerContent {
	10 = CONTENT
	10 {
		table = pages
		select {
			pidInList.field = uid
			orderBy = sorting ASC
			#languageField.data = TSFE:sys_language_uid
		}
		
		renderObj = COA
		renderObj {
		
			# Prallax Bild
			10 = FILES
			10 {
				references {
					table = pages
					uid.data = field:uid
					fieldName = media
				}
				
				renderObj = COA
				renderObj {
					10 = IMG_RESOURCE
					10 {
						stdWrap.wrap = <section class="parallax-section" style="background-image: url('http://muster.com/|');"></section>
						file.import.data = file:current:publicUrl
					}
				}
			}
 
			17 = TEXT
			17 {
				field = title
				wrap = <div class="containerWidth"><div class="container"><h1>|</h1>
			}
                        
                        
                        20 = USER
                        20 {
                            userFunc = user_contentTitle->getContentTitle
                            userFunc {
                                currentUid=TEXT
                                currentUid.field < lib.OnePagerContent.10.renderObj.17
                            }
                        }

			# Inhaltselement(e)
			30 = CONTENT
			30 {
				table = tt_content
				select {
					languageField = sys_language_uid
					pidInList.field = uid
					orderBy = sorting
					where = tx_gridelements_container = 0
				}
				wrap = <div class="content-inner" data-pid="{field:uid}">|</div>
				wrap.insertData = 1
			}
			
			wrap = <div class="content-section">|</div></div></div>
		}

	}
}

Ich Bitte um dringende Hilfe.

Danke. Gruss Steven

toifel ·

currentUid < .17

sollte in Zeile 45 schon reichen.
Einem TEXT.field kann kein komplettes cObject TEXT zugewiesen werden.

sthi1992 ·

Leider gibt mir das Resultat von:

    lib.OnePagerContent = COA
    lib.OnePagerContent {
    10 = CONTENT
    10 {
    table = pages
    select {
    pidInList.field = uid
    orderBy = sorting ASC
    #languageField.data = TSFE:sys_language_uid
    }
     
    renderObj = COA
    renderObj {
     
    # Prallax Bild
    10 = FILES
    10 {
    references {
    table = pages
    uid.data = field:uid
    fieldName = media
    }
     
    renderObj = COA
    renderObj {
    10 = IMG_RESOURCE
    10 {
    stdWrap.wrap = <section class="parallax-section" style="background-image: url('http://muster.com/|');"></section>
    file.import.data = file:current<i class="mmforum-iconset-20-razz"></i>ublicUrl
    }
    }
    }
     
    17 = TEXT
    17 {
    field = title
    wrap = <div class="containerWidth"><div class="container"><h1>|</h1>
    }
     
     
    20 = USER
    20 {
    userFunc = user_contentTitle->getContentTitle
    userFunc {
    currentUid < .17
    }
    }
     
    # Inhaltselement(e)
    30 = CONTENT
    30 {
    table = tt_content
    select {
    languageField = sys_language_uid
    pidInList.field = uid
    orderBy = sorting
    where = tx_gridelements_container = 0
    }
    wrap = <div class="content-inner" data-pid="{field:uid}">|</div>
    wrap.insertData = 1
    }
     
    wrap = <div class="content-section">|</div></div></div>
    }
     
    }
    }

einen leeren Array bei der UserFunc zurück.

Hättest du noch eine weitere Idee?? wäre sehr froh.