[TYPO3-english] comments => latest comments ?

Daniel Huf dhuf at cross-systems.com
Thu May 28 17:51:03 CEST 2009


I'm trying to get the latest comments from the folder where they are 
located.

That for I wrote this TS... but I'm not able to create the typolink to 
link back to the news where the comment belongs... do you have an input.

thanks
Daniel

CONSTANTS

lib.page.comments.latest.limit = 10
lib.page.comments.latest.pidInList = 73

SETUP

lib.page.comments.latest = COA
lib.page.comments.latest.wrap = <div class="comments">|</div>
lib.page.comments.latest{

20 = CONTENT
20 {
	table = tx_comments_comments
	select {		
		orderBy = tstamp DESC
		pidInList = {$lib.page.comments.latest.pidInList}
		where = deleted = 0 and hidden = 0 and approved = 1
		max = {$lib.page.comments.latest.limit}
	}
	
	renderObj = COA
	renderObj.wrap = <div class="comment">|</div>
	renderObj{
		5 = COA
		5 {
			10 = TEXT
			10.field = firstname
			10.required = 1
			10.wrap = <span>|</span>
			
			20 = TEXT
			20.field = lastname
			20.required = 1
			20.wrap = <span>|</span>
			stdWrap.typolink.parameter.field = email
    			stdWrap.typolink.ATagParams = class="commentemail"

		}		
	
		20 = TEXT
		20 {
			field = content
			wrap = <p>commentaire: |</p>
		}
		30 = TEXT
		30.field = external_ref
		30.split {
			token.char = 95
			returnKey = 2			
		}
	}
}
}


More information about the TYPO3-english mailing list