Typoscript get random data from a table
Gets random data from a table. Modify as required.
Copy this code and paste it in your HTML
lib.randomArticles {
wrap = <div class="rand-articles">|</div>
table = tx_articledatabase_articles
pidInList = 97
orderBy = rand()
max = 3
}
renderObj >
renderObj {
10.field = title
10.wrap = <h4>|</h4>
20.field = description
20.wrap=<p>|</p>
20.typolink.additionalParams
.wrap
= &
tx_articledatabase_pi1[showUid
]=| 20.crop = 150|...|1
}
}
Report this snippet
Comments
Subscribe to comments