I am using Typo3 4.5.3 and I have image files in a directory from which I want to randomly select it to display on the current page, but I can not get typoscript to do listnum = rand correctly. Here is my extension pattern:
# Pick a random image to display temp.banner = IMAGE temp.banner { file { height = 165 width = 954 import { filelist = {$templatePathPrefix}images/banners | jpg,jpeg,png,gif | name | | 1 listNum = rand } } params = class="bannerPic" }
If I change the listnum parameter to 0, 1, etc., it inserts the corresponding HTML img into the page. Setting it to "last" also works, but rand always inserts the first image no matter how many times I update. Since I can select specific images (0, 1, ...), I know that general setup works, not random selection.
I have seen TS for various other rand applications that wrap an external object in a COA_INT object, but that didn't work for me either. I missed something about where to place the list Num = rand? I am new to Typo3, so many of them are still pretty opaque to me at this point (or is it showing?). Thanks for any information you can provide.
source share