[TYPO3] Random Text + Image ... SOLUTION
Christopher
bedlamhotel at gmail.com
Tue Jun 13 21:32:35 CEST 2006
Hello all,
On 6/13/06, Scotty C <superscotty19 at yahoo.com> wrote:
> Hello everyone,
>
> Just to make it 100% clear, here is the full solution
> for having any type of content circulate randomly on
> every page of your site:
>
> 1.) In your HTML template, create a subpart (I use
> ###FEATURE### )
>
> 2.) Create a page in Typo3 that will store the random
> content and remember the page ID (Mine is 1092). Note:
> each content element will be counted as 1 item to be
> circulated.
>
> 3.) In your TS Template, enter the following code
> (note the PID):
> subparts.FEATURE = CONTENT
> subparts.FEATURE {
> table = tt_content
> select {
> pidInList = 1092
> max = 1
> orderBy = rand()
> }
> }
>
>
> That's it! I hope this complete mini-tutorial can be
> as useful to others as much as Tapio and Joey were for
> me.
...and just so your _solution_ is not too confusing in future, I think
you've got the TS wrong; it should be:
subparts.FEATURE = COA_INT
subparts.FEATURE {
10 = CONTENT
10 {
table = tt_content
select {
pidInList = 1092
max = 1
orderBy = rand()
}
}
}
...which is a non-cached object. If you just use a CONTENT object, you
will experience the problem you reported earlier (namely that it seems
to show the same random bit of content each time.)
-Christopher
More information about the TYPO3-english
mailing list