[TYPO3] random teaser

Scotty C superscotty19 at yahoo.com
Tue Oct 2 17:54:53 CEST 2007


Hey Roberto,

I've got THE BEST solution for you, and it requires no
extensions so it'll work no matter how many times
Typo3 gets upgraded. 

All you do is three easy steps (side note: I'll use
www.fleurt.ca as a reference):

1.) In your HTML Template, create a subpart. In my
example, I call mine FLOWER

2.) In the Typo3 backend, create a page of type "Not
in Menu", then put any number/variety of content
elements in it (In my example, I use images). Make
note of the page ID - in my case, the ID is 2990

3.) Still in the backend, go to the TypoScript
template of the site, and enter the following in the
SETUP field, substituting FLOWER with the name of your
subpart, and 2990 with your page ID:

### RANDOM FLOWERS ###
subparts.FLOWER= COA_INT
subparts.FLOWER {
    10 = CONTENT
    10 {
        table = tt_content
        select {
            pidInList = 2990
            max = 1
            orderBy = rand()
        }
    }
} 



That's it! So simple, so powerful.

This gem was given to me on this mailing list, so the
least I can do is return the favour ;-)

Have a good one!
-Scott.



--- Roberto Torresani <erreti at gmail.com> wrote:

> Hi all!
> 
> I need insert in the home page a random teaser of
> the subpage, that change
> every time somebody visit the home page.
> What is the best way/extension to do this?
> 
> I try with the module Pageteaser, but I have some
> problem with "random": the
> first time is random, but after the teaser is the
> same till I don't clear
> the cache
> 
> Thanks
> Roberto
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
>
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> 



       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/


More information about the TYPO3-english mailing list