[TYPO3-english] comments => latest comments ?

Daniel Huf dhuf at cross-systems.com
Fri May 29 10:31:45 CEST 2009


Hi François,

Be prepared for a burger and a beer at the TIKI's ;)

Thanks a lot it works like a charm, here the final result for it :

CONSTANT

lib.page.comments.latest.limit = 10
lib.page.comments.latest.pidInList = 73
lib.page.comments.latest.detailPid = 65
lib.page.comments.latest.commentTitle = commentaire:

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>{$lib.page.comments.latest.commentTitle} |</p>
			typolink.parameter = {$lib.page.comments.latest.detailPid}			
			
			
			typolink.additionalParams.cObject = TEXT
			typolink.additionalParams.cObject {
				field = external_ref
				split {
					token.char = 95
					returnKey = 2
				}
			}			
			typolink.additionalParams.wrap = &tx_ttnews[tt_news]=|
			typolink.useCacheHash = 1
		}
	}
}
}

Francois Suter wrote:
> Hi,
> 
>> typolink.additionalParams.dataWrap = 
>> &tx_ttnews[tt_news]={field:external_ref}
>>
>> Or if there is a way to create a new variable I could use...
>>
>> because this works too...
>>
>> 30 = TEXT
>> 30.field = external_ref
>> 30.split {
>>     token.char = 95
>>     returnKey = 2           }
>>
>> but I don't know how to apply it before the typolink...
> 
> Well additionalParams *is* a stdWrap itself, so you should be able to do 
>  something like:
> 
> typolink.additionalParams.cObject = TEXT
> typolink.additionalParams.cObject {
>     // put the above code here
> }
> typolink.additionalParams.wrap = &tx_ttnews[tt_news]=|
> 
> or something like that...
> 
> HTH
> 


More information about the TYPO3-english mailing list