Filter options

Category

Search

Reset

Add snippet

If you would like to create a new snippet, please click here:

Add snippet

list images from pages:media in TypoScript using FAL

Author Tags Category Date
Anja Leichsenring

1 snippets

FAL typoscript September 16, 2012

Task: have all images from pages media field listed in TypoScript, for example to use in a slideshow.

Note:
- This snippet will work in TYPO3 6.0 only!
- I used the FAL documentation draft found at http://forge.typo3.org/issues/34137

Description:
- the Top Level Object to use is FILES (line 1)
- the references part as shown reads all files from page uid 1 media field (line 3-7)
- the data line retrieves the attribute publicUrl from every file found (line 10)

  1. temp.slideImages = FILES
  2. temp.slideImages {
  3. references {
  4. table = pages
  5. uid = 1
  6. fieldName = media
  7. }
  8. renderObj = TEXT
  9. renderObj {
  10. data = file:current:publicUrl
  11. wrap = {image : '|', title : ' ', thumb : ' ', url : ''},
  12. }
  13. }