简体   繁体   中英

Typo3 - Flexform multiple Images / Image Cycle

My goal is to put out multiple images for one div ( http://malsup.com/jquery/cycle/basic.html ) using Flexform

Here is my Flexform: http://pastebin.com/vBKrGN5z

and the TypoScript:

prepend = COA
prepend {
  30 = COA
  30 {
    10 = IMAGE
    10 {
      file {     
        import = uploads/tx_gridelements/
        import.data = field:flexform_image
        width = 174c
        height = 174c
      }
      altText.field = flexform_text
      titleText.field = flexform_text
    }   
    stdWrap.typolink.parameter.data = field:flexform_link
    stdWrap.typolink.title.data = field:flexform_text     
  }
}

(prepend is from gridelements)

it works fine if i use only one image. But if i upload more than one image in the flexform field i have no output in the frontend :(

Yes, that's totally fine that way. See, TYPO3 does not know about whether you have images in said field or just a bunch of text. So if you upload multiple images normally you should have a list of file names seperated by comma.

First, check if this is the case. 6.x comes with FAL (File Abstraction Layer) so the bahaviour might be different.

If you have comma seperated filenames you might want to take a look at the split function of stdWrap.

You can use it to split a string by a certain delimeter (,) and then sort of "loop" over it. If you just need a dumb list of images this should be done pretty fast.

See this page for some inpisration. http://wiki.typo3.org/TSref/split

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM