[TYPO3-english] Load Random Image from Directory into a Subpart - SOLVED!

Scotty C superscotty19 at yahoo.com
Fri Jun 21 10:50:46 CEST 2013


Christian,

Yup, I thought of that too ... but that wasn't it either!

The kicker was, I needed to surround everything in a COA_INT. I used such a construct for a random content generator back in the day, so that triggered it for me. Doing so not only made the images work but also made the random feature work. That is, if you don't use COA_INT then randomization will not happen.

Final code:


subparts.TOP_BANNER_AD = COA_INT
subparts.TOP_BANNER_AD {
   10 = IMAGE
   10.file.import {
      filelist = fileadmin/demo/|jpg,png,gif|ext|r|1
      listNum = rand
   }
}

Thanks again - you're a lifesaver!
-Scott.



________________________________
 From: Christian Hennecke <christian.hennecke at wunderknaben.com>
To: typo3-english at lists.typo3.org 
Sent: Friday, June 21, 2013 2:31:16 AM
Subject: Re: [TYPO3-english] Load Random Image from Directory into a Subpart
 

Am 21.06.2013 09:59, schrieb Scotty C:

Hi Scott,

> Thanks for the speedy reply! Unfortunately, that didn't work. Specifically, I have:

[snip]

>        subparts.TOP_BANNER_AD = IMAGE
>        subparts.TOP_BANNER_AD.import {
>           filelist = fileadmin/images/|jpg,png,gif|ext|r|1

You are missing the file property here:

         subparts.TOP_BANNER_AD.import {

Should be

         subparts.TOP_BANNER_AD.file.import {

Cheers,

Christian
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list