Submitting your vote...
Rating: 4.7 of 5. 15 vote(s).
Click the rating bar to rate this item.

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



Comments


Søren, 05-07-07 20:11:
When you use this snippet, remember that content-elements of USER_INT type or other non-cached will not be rendered. This is due to COA_INT not being able to contain ex. USER_INT. COA_INT will automatically make the child elements non-cached
Max, 21-08-07 23:14:
This could be more correct in multilanguage websites:
lib.randomContent {
10 = CONTENT
10 {
table = tt_content
select {
elements are stored
pidInList = 30
languageField = sys_language_uid
max = 2
orderBy = rand()
}
}
}
Adrian, 15-01-08 20:58:

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
Kassi, 31-10-11 08:45:
Your cranium must be protecting some very valuable brinas.
Kinneth, 25-09-14 01:57:
Albateh keh baraye alamse Ruzbeh fahm va darke sohbathaye Maryam Rajavi sakht ast, Chape iran cheh as ghomashe khatte 1 v1 2 3 hichvaght sisat ra nafahmid va hamisheh rast zad va ya chap.Aghaye Ruzbeh, agar faghat beh mozegiriha va az jomleh khodetan nehah konid mifahmid????? keh chizy taghier kardeh
Petr, 26-09-14 18:08:
Hiya ..Nice read, I just passed this onto a<a href="http://apmiay.com"> cllgeaoue</a> who was doing a little research on that. And he actually bought me lunch since I found it for him smile Therefore let me rephrase that: Thanks for lunch! We strain to renew our capacity for wonder, to sh
Purnendu, 28-09-14 09:11:
Wow ..I truly appreciate this post. I have been lokniog everywhere for this! Thank goodness I found it on Bing. You have made my day! Thx again! Every time we remember to say thank you, we experience nothing less than heaven on earth. by Sarah Ban Breath http://fofqyhwjq.com [url=http://gypxjzy.com]gypxjzy[/url] [link=http://mbulkdeclr.com]mbulkdeclr[/link]
Elena, 28-09-14 15:37:
Hiya ..Nice read, I just passed this onto a <a href="http://bzrfps.com">frenid</a> who was doing a little research on that. And he actually bought me lunch as I found it for him smile Therefore let me rephrase that: Thank you for lunch! We strain to renew our capacity for wonder, to shock
Amit, 29-09-14 14:27:
Hmm ..Good write-up, I am normal vtioisr of one's web site, maintain up the excellent operate, and It's going to be a regular vtioisr for a lengthy time. There is a time for departure even when there's no certain place to go. by Tennessee Williams . http://ncakgao.com [url=http://dixlhf.com]dixlhf[/url] [link=http://vfexmuhjgx.com]vfexmuhjgx[/link]

Add comment

* - required field

*



*
*

Top 10 Updates

Contact us geändert am  21-Jul-2013 11:33:07
Contact us geändert am  21-Jul-2013 11:33:03
Useful Links geändert am  24-Apr-2013 08:31:20
Nice fonts using Google font API geändert am  20-May-2010 16:36:47
TS-based Searchbox for Indexed Search  geändert am  18-May-2010 18:27:15
TYPO3 SEO geändert am  30-Apr-2010 09:44:22
Search engine friendly graphical headers in TYPO3 geändert am  30-Apr-2010 09:33:44
Creating a simple Infocenter using TYPO3 geändert am  17-Nov-2009 12:12:52
Making the Section Menu work correctly with TemplaVoila geändert am  05-May-2009 12:27:17
Show pages with type "Not in Menu" in a sitemap geändert am  05-May-2009 12:11:17

Latest comments

29-Sep-2014 14:27:28
Amit Amit schrieb: Hmm ..Good write-up, I am normal vtioisr of one's web site, maintain up the excellent operate, and...
Random content
29-Sep-2014 14:03:00
Farah Farah schrieb: AdBlockPlus hatte ich frfcher auch installiert, iwihzscnen aber nicht mehr, weil ich eigentlich,...
Sample: Different header formatting for each column
29-Sep-2014 13:58:03
Revan Revan schrieb: Hi Milena,I just noticed your comnemt now, sorry for the delay.The only current drawback of the...
Show UID near the pagetitle in the backend page tree
Deutsch
Search: