

This snippet can be used to display random content elements from tt_content (stored in a sysfolder or a regular page)
lib.randomContent = COA_INT lib.randomContent { 10 = CONTENT 10 { table = tt_content select { # ID of the page where your content elements are stored pidInList = 30 # Number of content elements to show max = 2 orderBy = rand() } } }
This snippet was submitted by Peter Klein




lib.randomContent {
10 = CONTENT
10 {
table = tt_content
select {
elements are stored
pidInList = 30
languageField = sys_language_uid
max = 2
orderBy = rand()
}
}
}
Thank you very much for this snippet, that's exactly what I was searching for. But... unfortunately it doesn't work. What, for example, are those content elements in the sysfolder? Are they simple records? Or files?
I would really appreciate any help, because I simply don't know any solution, as I just intented many things...
Greets,
Adrian
Add comment