[TYPO3] Page content in div marker

JoH info at cybercraft.de
Mon Nov 12 17:37:08 CET 2007


>> subparts.randomimage < styles.content.get
>> subparts.randomimage.select.pidInList = 5
>
> The problem is that that wont be random and it will get all the
> content from that page (not just one random item)

So "max = 1" is necessary and there should be "orderBy = rand()"
and it would be nice to remove the wrap if there is no image at all.

temp.random_pic = COA_INT
temp.random_pic {
    stdWrap.required = 1
    stdWrap.wrap = <div id="randomimage">|</div>
    10 < styles.content.get
    10 {
        select {
            max=1
            pidInList=5
            orderBy = rand()
        }
    }
}

subparts.randomimage < temp.random_pic

that's it I guess.

Joey 




More information about the TYPO3-english mailing list