[TYPO3-english] Concatenation of a List with TypoScript

Scotty C superscotty19 at yahoo.com
Tue Mar 24 09:19:39 CET 2015


Hi everyone,
I need to build a "super <A> tag" to use in a fancybox like this:http://jsfiddle.net/kmLWf/260/
The problem is, I need to build the HTML dynamically from a directory of files
 Here's what I need specifically:1.) Traverse directory/folder for file names2.) Clean up the file name and use that as the "title" parameter3.) Use the file name with an IMAGE object and link to the full size image4.) Use the file name with an IMAGE object, shrink it to a thumbnail put it in an <img> tag5.) Put it all together into one giant <a> tag
Here's my mess so far:
# Reference: 
# http://typo3.3.n7.nabble.com/TYPO3-english-List-of-files-from-a-directory-with-TS-td114707.htmltemp.title = TEXT temp.title { 
  # *** grab all files  filelist = fileadmin/templates/education||name 
   # *** split up the results from above - see php explode()  split {       # search for comma delimiter      token = ,       # no idea what this does      cObjNum = 1       # wrap object in a TEXT block to apply functions to it      1 = TEXT       1 {           # no idea what this does          current = 1          # extract everything but the .jpg          substring = 0, -4          # convert _ to " "          replacement.10 {           search = _    replace = &#160;    useOptionSplitReplace = 1 }         # outputs (ex) "title=chalk board"         wrap = title="|"      } # end 1            # output <img src="chalk_board.jpg" width="200">      2 = IMAGE      2 { file = ????          width = 200      } # end 2    
  } # end split
  # TODO: join up 1 and 2  # ????
} # end temp.title


Of course this is easy with PHP. But as for TS ... Each piece of what I need is documented, but put together ... I'm lost.
Thanks as always,-Scott.


More information about the TYPO3-english mailing list