[TYPO3-english] Access sys_file_collection from page uid

Ok Z4uit adriaanbr at gmail.com
Mon Jan 26 19:02:56 CET 2015


Dear all,

First of all, I'm not a programmer and I'm not that good at typoscript, but I find my way around in the manuals and wikis.

That said, I have a question, how can I access a file collection on a certain page with typoscript?
I managed to load the file urls in a mark, but only with the uid of the table sys_file_collection.

MARK1 = FILES
    
MARK1 {
references {
  table = sys_file_collection
  uid=2
  fieldName = files
}
         
renderObj = IMG_RESOURCE
          renderObj {
            file.import.data = file:current:uid
            file.treatIdAsReference = 1
            titleText.data = file:current:title // field:nav_title // field:title
            altText.data = file:current:alternative // field:nav_title // field:title
            stdWrap.wrap = "|",
          }
         
          stdWrap.wrap (
            <script>$.whatever_script([|], {constants: 1000});  </script>
          )
}

Is there for instance any way to load right field based on the pid of the table? Or a another way to link the uid of sys_file_collection to the page uid?
Or is there a much better and simpler way to achieve my goal, WITHOUT using the media field via the resources of a page?

Best,

Adriaan


More information about the TYPO3-english mailing list