[TYPO3-english] comments => latest comments ?

Daniel Huf dhuf at cross-systems.com
Fri May 29 09:46:05 CEST 2009


Thanks for the idea, but my problem is I don't know how I can do that on 
this value ?

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...

Thanks a lot
Daniel

StephenBungert wrote:
> Well you know that tt_news_ is always there, then you could try using the
> stdWrap property substring(8). I think 8 is right here, I'm sure the
> counting of chracters starts at zero.
> 
> Don't know if that will work but maybe you can try it.
> 
> 
> 
> daniel huf-2 wrote:
>> This is the closest I can get, do have another trick to separate the 
>> "tt_news_120" into 120 ?
>>
>> the link I get is &tx_ttnews[tt_news]=tt_news_120
>>
>> hmm
>> thanks
>> Daniel
>>
>> CONSTANTS
>>
>> lib.page.comments.latest.limit = 10
>> lib.page.comments.latest.pidInList = 73
>> lib.page.comments.latest.detailPid = 65
>>
>> 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 = |
>> 			
>> 			20 = TEXT
>> 			20.field = lastname
>> 			20.required = 1
>> 			20.wrap = |
>> 			stdWrap.typolink.parameter.field = email
>>     			stdWrap.typolink.ATagParams = class="commentemail"
>>
>> 		}		
>> 	
>> 		20 = TEXT
>> 		20 {
>> 			field = content
>> 			wrap = <p>commentaire: |</p>
>> 			typolink.parameter = {$lib.page.comments.latest.detailPid}			
>> 			typolink.additionalParams.dataWrap = 
>> &tx_ttnews[tt_news]={field:external_ref}
>> 			typolink.useCacheHash = 1
>> 		}
>> 		30 = TEXT
>> 		30.field = external_ref
>> 		30.split {
>> 			token.char = 95
>> 			returnKey = 2			
>> 		}
>> 	}
>> }
>> }
>>
>> Daniel Huf wrote:
>>> 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 = |
>>>            
>>>             20 = TEXT
>>>             20.field = lastname
>>>             20.required = 1
>>>             20.wrap = |
>>>             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           
>>>         }
>>>     }
>>> }
>>> }
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>>
>>
> 
> 
> -----


More information about the TYPO3-english mailing list