[TYPO3] Random content with limited text

Eric Thelander 3d-telis at home.se
Thu Feb 28 21:23:10 CET 2008


Hello Peter

Thanks for your help. I used your setup and managed to get the text 
right, cropped and all. But I need the script to also include the image. 
Another thing I would like is to place a link "Read more" after the "..."

Best regards
Eric

Peter Klein skrev:
> Hi Eric.
> Do it using TypoScript. That way you have full control over what is 
> displayed.
>
> Example:
> -- cut --
> lib.randomContent = COA_INTlib.randomContent {  10 = CONTENT  10 {    table 
> = tt_content    select {      # ID of the page where your content elements 
> are stored      pidInList = 30      # Number of content elements to show 
> max = 2      orderBy = rand()    }    renderObj = COA    renderObj {      10 
> = TEXT      10.field = bodytext      10.crop = 200 | ... | 1 
> 10.parseFunc = < lib.parseFunc_RTE    }  }}-- cut --
>   


More information about the TYPO3-english mailing list